open design for program

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

layervisibility.zip
Parents Reply
  • Gerald Hernandez:

    This has frustrated me for some time because certain changes can easily be made on many files using OpenDesignFileForProgram, but the resulting change cannot be saved.

    Dear Gerald,

    I am in the same boat at the moment. I realized my codes were working but couldn't find the save settings options for files opened with "OpenDesignFileForProgram". Thank you so much for sharing your experience. I hope we will find the MDL options if there is any. 

    Sincerely,

    Rabi

Children
No Data