When I use VBA property ActiveDesignFile.Name or ActiveDesignFile.Path I see the value I expect.
ActiveDesignFile.Name
ActiveDesignFile.Path
When I use ActiveDesignFile.Title I see nothing — the String is empty. Help tells me: Getting Title raises an error if no value is defined for it. However, I don't get an error.
ActiveDesignFile.Title
String
Title
Hi Jon Summers,
I need to discuss this with Artur Goldsweer (today) and I believe this behavior (along with others) can be addressed under existing Bug 684163 (Missing trigger to make changes visible in Properties Dialog, if property fields like Title, Comments etc. are modified with VBA). I/we will provide an update as soon as possible.
Thank you,Bob
Bug 684163 is specific to the MicroStation File Properties (GUI) dialog displayed not updating.
For your API question, we do see a need to change our documentation that when Getting Document Properties (via VBA/COM) will only produce a Runtime Error IF the Property Field does not Exist vs. currently documented to produce a Runtime Error if the Value is Empty (not true).
We will file a bug for this and provide an update as soon as available.
Thank you for reporting this issue.
Bob (and Artur).
Answer Verified By: Jon Summers
Hi Jon,
after further investigation I think the VBA documentation is correct for all extended file properties, this includes all these properties:
Author, Comments, Client, Company, DateLastPlotted, Title, Manager and Subject.
It depends on the file format of the active drawing file, if a value for these properties is defined and an error occurs.In case of V7 DGN format all properties are raising an error and in case of DWG file format only the propertiesAuthor, Comments, Title and Subject are not raising an error.Only the V8 DGN file format is not raising any error because for all extended properties a value is defined, which may be an empty string, but no error occurs with V8 DGN files.
It may be helpful first to check the drawing file format before trying to read any of these properties.
I hope this helps?
Best regards,
Artur
Artur Goldsweer said:It depends on the file format of the active drawing file, if a value for these properties is defined and an error occurs.In case of V7 DGN format all properties are raising an error and in case of DWG file format only the propertiesAuthor, Comments, Title and Subject are not raising an error.Only the V8 DGN file format is not raising any error because for all extended properties a value is defined, which may be an empty string, but no error occurs with V8 DGN files. It may be helpful first to check the drawing file format before trying to read any of these properties.
Useful comments: please add to the VBA help documentation.
Regards, Jon Summers LA Solutions