Hi, I need the method CreateLineElement1 to write something similar to the example communities.bentley.com/.../8788.
However, when testing with this method, it throws me the following runtime error: System.ArgumentException HResult=0x80070057 Message…
hi
I am trying to place an element in C# Addin .Net, but since the default global origin of the seed file is not (0,0,0). I am unable to place the element at the correct coordinates. I tried to change the global origin with this code, but it didn't…
Hello All,
I have written a routine to generate a shape from a series of points and then utilize the shape to define a fence from element.
I would like to process the fence in two separate routines one that will clip normal element type like Lines…
TextBlock Class
From the DgnPlatformNet help document: In the TextBlock DOM, this is the master object that represents a piece of text as a whole, and is the primary high-level object used to deal with multi-line, formatted text (and is also generally…
Hello all,
I would like to read the Custom File Properties from a DGN file.
The image above shows the custom file property 'MY_PROP', which I would like to want to read out. My previous approach (via DgnECInstanceCollection) was unfortunately unsuccessful…
I want to create a new DGN model by opening and reading an existing DGN file. The object is to get a reference to a seed DgnModel to use when creating a new DgnModel .
DgnFile.CreateNewModel looks like the right method, but requires a DgnModel reference…
We are plotting elements and storing them in a List for reference.. What we have noticed is that when the elements are undone, the "IsDeleted" property becomes True and the IsValid property become false as expected....
However, once we add a new element…
Hi
I just started with MicroStation so forgive me my ignorance. ;-). I have C# Bentley.MstnPlatformNET.AddIn with WPF form that is displayed through "mdl load xxxx" I need to be able to click on drawing (.dgn) and read element id property that is selected…
Dear Community,
I am trying to read all references including the nested ones from a DGN file. However, I always end up with only first-level references and I can not go deeper. Here you can see one pice of code that returns only the first level references…
I'm trying to make ChildElementCollection work using C#. I want to modify a cell by assigning a level to a line within that cell. I read the cell, iterate its children, modify the line, then rewrite the cell. Here it is in C#...
private bool AssignLevel…
I establish an event change handler in my AddIn ...
protected override int Run(string[] commandLine)
{
SetupEventHandlers();
return 0;
}
void SetupEventHandlers ()
{
s_Addin.LevelChangeEvent += LevelChangeHandler;
}
Then react to events in LevelChangeHandler…
Hello, folks! For once, SDK has a rather extensive example for programming WPF applications. This example is called WPFdemo. Here you can open a dockable toolbar with 'wpfdemo open5'. So far so good.
But now I would like this toolbox to behave like…
Hello
I made addin application in c#. I created a window in MVVM pattern so ui is made in XAML file and then attached to DockableToolbar as it was in example: public class DockToolbar : DockableToolbar, BMG.IGuiDockable
{
static private DockToolbar…
Hi,
I would like to specify the value for InterCharSpacing or CharacterSpacingValue when setting a text. The value '100' entered here does nothing. I could also omit the respective lines. Is there anything missing here, or is this the wrong approach…
Hello, As you know, a shape stops at 5000 vertices. When this limit is reached, I want my method to automatically create a ComplexShape.
Here is an excerpt from my source code, where this works with <= 5000 for pure Shape elements. With more than 5000…
Hi community,
we're upgrading C# code for OPM V8 SS5 edition to OPM CE (upgrade 9). The IBMECObject.GetDoubleValue method is no longer available and there are some others the gets values in specific unit (ie GetDoubleValue InMM, GetDoubleValue InUors…
I am trying to updated a Text Node containing a single Text Element inside a cell in a DGN file. Everything seems to work ok until I attempt to replace the existing cell with the modified version using the ReplaceInModel method. At that point the program…
Hello,
I wanted to catch messages from notification panel of microstation.
I can catch messages with green underline with AddIn.MessageCenterWriteEvent.
But I can't catch message with red underline. I found NotificationAdministrator with description…
Hello,
I have problem with setting scale for linestyle in c#. If anyone found working solution please share it.
So far I tried to use ElementPropertiesSetter SetLineStyle function because this function takes LineStyleParameters as param but i can…
Hi,
I am trying to initialize BentleyView application in my C# Class Library using 'Bentley.Interop.MicroStationDGN'. Following is the snippet I am using:
private Application application;
public Class1()
{
ApplicationObjectConnector…
Hello,
I need some help to programmatically add dimensions into a 3D model where the dimension vertices are associated with edges or vertices of on or more smart solids contained within shared cells. This is easily accomplished manually however, due…
Hello everybody,
how we can to add a field to a text element with the value of its ItemType property like Insert field option from Text editor dialog (see image)? It is possible in C#?
many thanks,
Gents,
I’m looking for solve an issue that occur in the following conditions:
a WPF Microstation Connect AddIn developed in C# is running
an external application (developed in vb.net) call the method Application.CreateDesignFile as follows:
…