Hello,
I am trying to list all the levels present in a dgnlib file using VBA. However, all library levels do not show.
Below, is the simple sub (test) to output the name of each level. However it only outputs ones that are imported in the dgnlib…
Dear VBA Experts,
I am trying to write some codes which will help me batch process levels visibility on multiple models in several DGN files. The codes I have written is posted below. My codes work perfectly fine when I open the DGN and activate…
Tim:
I would like to find a cleaner way than without having to use key-in but that may be the way I have to go.
The cleaner way is to use the
levels API .
Regards, Jon Summers
LA Solutions
Level Names, Codes, and Numbers
Tim:
I do not quite understand why levels have a name and a number.
There are three ways, as a programmer, that you use with levels:
name, code, and number .
From the user point of view, a level…
I am writing an application to analyze a DGN file for levels that have elements on them and whether they are on or off for both the active file and all attachments. This is to create an Excel spreadsheet report, to have a record of what levels are on…
Hi,
It seems that many level operations are very slow. This accelerates when you have many dgnlibs with many levels. We have a program that reads external data and creates element and levels. The level creation takes a considerable time when using…
Mixing declarative code with queued commands sometimes leads to inconsistent results. Since you are working with ActiveDesignFile.Levels , why not simply add a level to that collection …
Dim levelName As String levelName = "level name" Dim oLevel As…
Level Owner: File & Model
The reason for your observation is this:
a DGN file is the container for all levels — the level table belongs to the DGN file.
Therefore, when you query the DGN file for levels, you see all the levels in the level table…
Hi all!
I need to create a CSV file that lists all levels from the active file and all references. I'm only really interested in saving the on/off setting for each of the 8 views in the active file.
I'm able to loop thru all the levels…
VBA and Levels
spike:
I started to learn MicroStation VBA programming yesterday.
That is how to add a new level?
I read some samples of MicroStation VBA referance and did like this:
Sub AddLevel()
ActiveDesignFile.AddNewLevel("NewLevel…
To turn off the override colour, you don't use the OverrideColor property; you use the UsingOverrideColor property.
To set it on a nominated level, first specify the level. Eg, if you have a level called 'Kerb Invert', turn if off with:
ActiveDesignFile…
spike:
The level named My-Stuff was successfully created but the color of level still didn't change.
What do you mean by 'the color of level'? Do you mean the ByLevel colour, the Override colour or the active colour (which is not really level related…
Spike,
it is possible to use keyIns in VBA, so that should get you started most of the times.
CadInputQueue.SendKeyin "LEVEL CREATE ""My-Stuff"""
CadInputQueue.SendKeyin "LEVEL SET DESCRIPTION ""My-Stuff"" Mine"
CadInputQueue.SendKeyin…