Hi
I've created a VBA to add different shapes (other than rectangular and circles) to the worksetshapes.xml. At the moment it doesn't work unless I've created a rectangular shape with the built in tool:
Because after creating that first one, the xml-file fills up with different shapes and so on:
Is there a way to generate this with VBA command or a keyin? Or is there andother way to get around this problem?
Running OBD, CE update 5
Robert
Hi Robert,
VBA definitely isn't my thing, but... are you saying that the VBA only adds new sections to the selected XML if a custom rectangular shape had first been added through the placement tool? IOW, as though adding the rectangular section first somehow "formats" the XML and then allows the VBA to do its thing?
This is how the delivered worksetshapes.xml looks like:
This is how it looks after creating just one rectangular shape.
I'll then insert the shape I want trough the VBA under the corresponding shape type.
I'm no star att VBA, a beginner really. So it would be much easier for me if the file looked this from start.
any particular reason why you can't just use the blank xml in your snapshot as a starting template for your vba routine? Either manually remove the dummy rectangular shape or re-create the xml file with no section data at all.
The xml created from StructuralShapesTemplate.xls is actually an xml export with mapped schema, so vba isn't involved in the process.
Ok, where do I find the StructuralShapesTemplate.xls file? Maybe I can just put it in my seed-folder. The reason I wanted to generate this is for my program to work in already existing projects/worksets.
Should be found in C:\ProgramData\Bentley\OpenBuildings CONNECT Edition\Configuration\Datasets\Dataset_XXXX\Data\StructuralShapesTemplate.xls
Correct, Tuan. Each delivered dataset includes the StructuralShapesTemplate.xls file along with the section XML files themselves.