Already in a file with a workspace/workset, I programmatically create a new file to receive an extract from the current file.
The file is created with Application.CreateDesignFile, and I open it with Application.OpenDesignFileForProgram.
I .Close the file after writing elements to it..
When that new file is opened with Application.OpenDesignFile, it does not have any Workspace or Workset and the usual dialog is presented to the user.
I would like to have the file branded before it opens.
I guess I could prepare branded seed files for every combination of Workspace/Workset and use those when creating my extract file, but I would prefer not to use such a work-around
Jon Summers said:However, it doesn't look like that class has been wrapped by a VBA equivalent, and I don't think there's a way to call into the MicroStationAPI from VBA.
I think (but I have not tried it) pretty anything exported from native dll can be somehow called from VBA. But in my opinion it often requires pretty big amount of detail knowledge, that such person is probably able to write native application and will not waste time with obsolete limited VBA :-)
Regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
All,
FYI. Adding Artur Goldsweer to this conversation to see if he can confirm these behaviors and file an additional defect related to VBA and worksets besides this unrelated behavior we hope to address in or before Update 16.
Defect 1077281:VBA Projects loaded before the Backstage and opened before a workset is selected executes VBA code in an inactive workset.
HTH,Bob
Hi All,
I have tested to create new dgn files using the method .CreateDesignfile and can confirm, that the resulting new dgn file is branded only, if the used seed file (given as 1st parameter for the method CreateDesignFile) already is branded:This is different to creating new dgn files from Backstage File > New.I have filed Defect # 1098273 to address this issue.Like you mentioned earlier a workaround would be to use branded seed files, the COM object library does not provide methods to add workspace/workset info.
Best regards,Artur
Thank you very much Artur Goldsweer!
Thank you, Arthur
I believe we will use branded seed files for the time being although annoying with about 30 workspaces.
BTW impressed by the fact that you took the time to link the new defect to our company :-)
\Lars M-P