Hello, is it possible to apply view attributes to multiple models in a file with a single tool / key-in or command? Our programmer has a VBA macro that creates multiple sheet models in a file (anywhere from 5-200) but a few of the view attributes need to be adjusted after those models have been created. I've looked in the help file & searched the forum but I don't see anything about this.
The logical move would be to correctly set the view display settings in the VBA before creating the models.
Alternatively you can import a Saved View and apply the settings and then delete the Saved View.
Barry, can you apply a saved view to a group of models instead of having to get into the models individually?
You should be able to do this with a batch process. Create a text file with the required key-ins to set the attributes
VIEWATTRIBUTESDIALOG SETATTRIBUTE 0 Transparency True
VIEWATTRIBUTESDIALOG SETATTRIBUTE 0 Transparency False
VIEWATTRIBUTESDIALOG SETATTRIBUTE 0 LevelOverrides True
VIEWATTRIBUTESDIALOG SETATTRIBUTE 0 LevelOverrides False
Open Batch Process and set the path to the text file. Load all of the .dgn files and make sure Process All Models is selected.
Microstation CONNECT 10.17.00.209
ORD CONNECT 2021 R1 10.10.1.3
Microstation v8i SS 10 08.11.09.919
Power InRoads v8i 08.11.09.615
Thanks Barry, I'll pass this on to our programmer.
Mwlong, thanks for the input. It's been a while since I've used script files.
It's been a while for me as well. It took a while to think about how to accomplish the task as I was stuck thinking you would need to use a macro to process the models. I forgot about the Batch Process utility. It can be a life saver at times.
I can upload the Macro if you want it, however, you would need to change the name of the Saved View written in the Macro, to whatever name you wish to choose, and also the path to the DGN or DGNLIB that contains the Saved View (or simply tell me what they are and I can make the changes before uploading).
Thanks for the offer, but I created a script file like mwlong suggested and it worked great.
Please use "Verify answer" button at mwlong's answer, so the discussion is marked as Answered and "future readers" see what information you used to solve the issue.
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point