Problem with api.ReadBvf ()

548 viewsQuestions and Answers

I am trying to embed another * .XML file in a * .BVF file.
With the api.WriteBvf (bytes) method, apparently the XML file is appended. the size of the BVF file is increased.
The problem starts when api.ReadBvf () is called. returns null.
I have observed that var count = Api.get_bvf_size (pid); always gives file length ‘0’.
By manually entering the length of the file, ‘api.ReadBvf ()’ still returns null.
Could you tell me the correct way to use these methods?
Would it be possible to have a piece of code?

Thank you

Anna Changed status to publish 9 October 2020


Bvf is a collection of files.

Before using the ReadBvf function, you must first use the BeginReadBvf method (to indicate the file name in BVF).

Code example for reading the xml file:

private void onModelLoad()


byte[] xml;

bool test = api.BeginReadBvf(@”comments.xml”);

if (test == true) xml=api.ReadBvf();


In case of any further questions please contact us by email (

Best regards,

BIMvision Team

Anna Changed status to publish 9 October 2020