Dear Experts,
In my opinion running batch process for functions like manipulating visibility of reference levels just takes long time. In contrast running the similar functions while using "OpenDesignForProgram" seems to be faster. Please find attached with this post a zip file which has an Excel document, a bas file, and few DGN for test.
Here is how this process is thought of. I know it might be a long route but I find this very quick if I figure out the issue I am having. For using the attached files please download the zip file and unzip it to your desktop.
1) Open the attached Excel and give folder path in Cell C3. - The folder path is to the folder which contains all the DGNs for programming.
2) Click "Import". - This will populate column B with the names of DGN for programming.
3) Select all the cells in column B and minimize Excel. - This is our selection of files we want to run functions on.
2) Open MicroStation and open any file other than the ones in the above mentioned folder path.
3) Create a new mbva and import the .bas file into your VBA Editor.
4) Make sure you have references for EXCEL 12.0 or otherwise.
5) Run the macro. - If things are setup correctly then all should go well.
On a side note please make sure the DGNs in your desktop have the title block attached. I did updated them but they seem to change sometimes.
My issue is, the program runs just fine. No errors are generated. But when I open the DGN I don't see any changes with levels. The changes made are not saved in the DGNs.
When I make changes in DGNs manually by clicking the levels visibility turn off or on I usually have to do Save Settings. And then those settings are remembered. What would be the process to do this in VBA for the process I am following.
Your help on this would be a great help to me. I believe this will open a whole new set of processes for me to work on DGN files. Please let me know.
Sincerely,
Rabi
You can't modify attachments since they are read only. You can modify only active model and probably you should read more about difference between model and attachment. Model is a content of design file while attachment is just reference to it..... To get this working as you need, you should open each of that attachment with use of method OpenDesignFileForProgram as well, since you need to do modifications... Then modify levels and save it... After this, if you need to see changes in some open design file, that has those attached, you would want to reattach them to see changes made outside...
Dan