Hi Paolo,
as Jon wrote: It would be better to extract code that does not work than to share complete project, because it makes analysis more complicated (and, in fact, it's not really safe to try to open and run 3rd party macro on own computer).
Paolo…
Paolo Maggiani said: I don't want to really open the destination file (OpenDesignFile): I wish user don't see anything...
I want and wish (and also don't want in other cases) a lot of things. Many from them are too far from reality, but the rest can…
Paolo Maggiani said: I should open the file with OpenDesignFIle, attach a reference and use the CopyElement or AddElement (which one?), then detach the file, right?
Correct! Use CopyElement , passing a CopyContext . From VBA help: CopyElement's default…
Paolo Maggiani said: I wish user don't see anything
VBA developers often state something similar. The real question is, "Do your users care that something is happening automatically?"
First, get your app working. Second, ask users for comments. If…
Paolo Maggiani said: Is that the only way to get the active level?
Dim oSettings As Settings
Set oSettings = ActiveSettings
Dim oActiveLevel As Level
Set oActiveLevel = oSettings.Level
More concisely...
Dim oActiveLevel As Level
Set oActiveLevel…
VBA provides the Selection Set , Fence and Scan choices.
The first two provide you with a VBA ElementEnumerator object. ModelReference.Scan gives you, as a programmer, more flexibility.
MicroStation's Fence has various selection modes. Fence Void…
Hi Paolo,
Paolo Maggiani said: Is it possible
I think there is no such function in MicroStation (both user tool and in API). Did you search for similar questions? I found several discussions (surprisingly not too many), but without solution or workaround…
Hi Paolo Maggiani ,
Recording a macro ( MicroStation VBA and/or Bentley Macro Recorder ) are always good first steps to try and capture global variable settings that may be present and especially in modal dialog boxes. I would also like to suggest if…
Paolo Maggiani said: Some MS dialog boxes are manageable by IModalDialogEvents others not
Correct!
Most MicroStation dialogs are modeless (they don't have an OK button). A modeless dialog can stay open while you continue to work.
Some dialogs are…
Hi Paolo,
Paolo Maggiani said: You mean I have to copy VBA macro recording expressions avoiding to write them by myself from zero?
yes, it's exactly what (I think) Jon recommends.
From MicroStation V8 VBA help (I assume you studied SetCExpressionValue…
Paolo Maggiani said: I'd like to interact with Visible Edges Dialog Box with VBA
In general, there is no connection between Visual Basic and MicroStation dialog boxes. They use very different technologies that don't mix well.
Paolo Maggiani said:…
Paolo Maggiani said: I get Visual Basic Reference Help, not MicroStationVBA Help
Read this article about VBA help .
Press F1 in the VBA editor...
If your cursor is in a standard VBA keyword (e.g. String ) you will see Microsoft VBA help
If your…
Hi Paolo,
I do not quite understand your question. What do you mean by "standard" and "additional component"?
The methods you mentioned (and many others CreateXXX) are part of MicroStation VBA API.
Did you read e.g. Learning MicroStation VBA book…
Workflow, how it can be solved when moved will be references attachments in Default model, not content in individual models:
Prerequisities:
Default model exists
Template model (with proper content + attached references) exists, the content is…