I Opened the dgn file using "OpenDesignFileForProgram" : Language C#
//collected the elements
//only one text element in that file
if (el.IsTextElement()) { Console.WriteLine(el.Type) // 17 working fine
Console.WriteLine(el.ID) //working fine…
A VBA programmer can open a DGN file using two methods: OpenDesignFile and OpenDesignFileForProgram . This blog attempts to clear up confusion between the two, and which one to use.
Prefer OpenDesignFile
Prefer OpenDesignFile to OpenDesignFileForProgram…
Hello
I am checking .dgn files with OpenDesignFileForProgram. One of the information i need to drag out is Scale Setting and check if its 1,1,1 or not (just need to read it). It seems I am only allowed to read ActiveSettings.Scale and can not find the…
Hi,
I need to scan several hundred design files for their raster attachments.
I'm trying to avoid having to open each file as that really slows the process down.
Has anyone had success using OpenDesignFileforProgram to get raster file attachment…
Unknown said: When you open a dgn with OpenDesignFileForProgram , what can and can't you do?
OpenDesignFile
With VBA you can operate on the ActiveModelReference in the ActiveDesignFile .
Your VBA code can do whatever a MicroStation user can…
I am using OpenDesignFileForProgram for counting elements.
I would like to Remove Element also, can this be done? My experiments all seem to result in "Model is Read-Only".
Thanks,
Paul
I've posted this problem in a another thread that had a different subject.
I'm getting different results running this code in XM and in V8i.
In XM the result is Num=5, which is correct.
In V8i the result is Num=1, which is wrong. Apparently oLevels…
Fellow Microstation VBA users,
I neeed some basic code to add/modify Xdata for an element, in a cell, in a design file, opened with OpenDesignFileForProgram. I'm uncertain how to do this. My guess would be to utilize the Appplication.ObjectConnector…
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…