Hi
As discussed here: https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/186087/extract-item-types-attached-to-models-with-vba/ there seems to be some problem with reading the item types values with VBA.
A workaround that could work for me is to use the reports-tool. But in order to do that, I would have to export the report as a .csv-file. Is there a way to do this tough VBA or key-ins?
Regards,
Robert
Robert Högberg said:there seems to be some problem with reading the item types values with VBA.
Yes, but as discussed in the discussion, when PropertyHandler is used, ItemType Property values can be exported without any issue.
Robert Högberg said:A workaround that could work for me is to use the reports-tool
Yes, the data can be extracted manually (details of design file) to Excel or defined in Report and exported.
Robert Högberg said:Is there a way to do this tough VBA or key-ins?
I think there is no VBA Report API, but necessary key-ins are mentioned in MicroStation documentation. Did you check it?
REPORTS EXPORT [ CATEGORY NAME\DEFINITION NAME ] seems works fine, but manual choosing export format and location is still required.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Jan Šlegr said:Yes, but as discussed in the discussion, when PropertyHandler is used, ItemType Property values can be exported without any issue.
Ok, I'll check that out too, but this solution would have been easier for me, maybe even better, IF I could change the format. With the excel-export it formats in ways I don't want it to, "1:10" reads as some sort of decimal number instead of how it should be.
Robert Högberg said:"1:10" reads
seems to be a Notation (typically for MicroStation) in the form 1 MU and 10 SUMU=MasterUnit, SU = SubUnit.
Don't know, but it may help to set the units display in the DGN, or you have to transform the CSV in a second pass. XSL Transformation could be useful.
Mit freundlichen Grüßen / Best regards Volker Hüfner
| AB_DATE Engineering Software | ab-date.de |
It's actually an itemtype value that I've added myself. So it's just a string of text, which Excel reformats when I export it. Even with the .XSL, but thanks for your idéas.