Export report VBA

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

Parents Reply
  • Hi Robert,

    in my opinion it would be good to split identified issues into separate threads to increase probabily they will be discussed at a right place (because the most of them are not programming issues) and will be better visible:

    there seems to be some problem with reading the item types values with VBA.

    It seems ItemTypes API does not work well yet, but classic PropertyHandler works fine, is documented and it's use has been discussed many times. It means it's possible to export ItemTypes values to text file using VBA.

    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? 

    No, it's not possible (probably): There is a key-in available to start "export report" process, but to select output format, locate folder and define file name has to be done manually.

    The only formating I can do on that is case.

    Yes, every data type offers different formating possibilities. For text properties, only a few options are available.

    So it's just a string of text, which Excel reformats when I export it.

    I think you should fill Idea (or report is as a bug), because the problem is that values are exported (saved) as "automatic" format I guess, so when loaded by Excel, they are detected as numbers in this case. I have seen this issue several times in different program, but it's bug in MicroStation export tool in my opinion, because when ItemType property data type is text, the value should be stared with apostrophe at the beginning, which is a mark for "it's text, do not change its format".

    With regards,

      Jan

Children