• [CONNECT Update 17 C#] CreateLineElement1 throws a runtime error, but with CreateLineElement2 everything is ok?

    Frank Schneller
    Frank Schneller
    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…
    • 22 days ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • [MSCE C#] how to set Global Origin

    Nina Shepel
    Nina Shepel
    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…
    • 10 months ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • Is it possible to import dgn files to a active dgn file as models in C#

    Samuel Wiklund
    Samuel Wiklund
    I would like to find a way to import dgn-files (models) from folder to a active dgn as models using C#
    • 11 months ago
    • OpenRoads | OpenSite
    • OpenRoads | OpenSite Forum
  • Fence only interact with specific element types

    Keith Ouellet
    Keith Ouellet
    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…
    • over 1 year ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • [CONNECT Update 17 C#] Navigating a TextBlock

    Jon Summers
    Jon Summers
    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…
    • Answered
    • over 1 year ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • How to harvest custion file properties (dgn file) in Microstation C# Addin

    Namik Ley
    Namik Ley
    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…
    • over 1 year ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • [CONNECT Update 16 C#] Get a DgnFile and DgnModel by Name

    Jon Summers
    Jon Summers
    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…
    • Answered
    • over 1 year ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • [MSCE U16 DgnPlatformNet] Elements stored beyond an "Undo" operation are being replaced by new elements

    Maury
    Maury
    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…
    • over 1 year ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • How to get selected element id and display it in WPF form in Bentley.MstnPlatformNET.AddIn

    Mykhaylo Beley
    Mykhaylo Beley
    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…
    • over 1 year ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • [CE U16 C#] Get the Microstation version by code

    Ivan Nikolov
    Ivan Nikolov
    Dear Community, Is there a way to retrieve the Microstation version number through C#? Thank you in advance! Best regards, Ivan
    • Answered
    • over 1 year ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • [CE U16 C#] Read all references (nested also) and their respective file location

    Ivan Nikolov
    Ivan Nikolov
    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…
    • Answered
    • over 1 year ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • [CONNECT Update 16 .NET] ChildElementCollection: How to Update Child Element

    Jon Summers
    Jon Summers
    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…
    • over 1 year ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • [CONNECT Update 16 C#] Level Change Events

    Jon Summers
    Jon Summers
    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…
    • Answered
    • over 1 year ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • [MicroStation CONNECT Update 16 C# WPF] Is dynamic toolbox possible?

    Frank Schneller
    Frank Schneller
    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…
    • over 1 year ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • [CONNECT Update 15 C#] Refreshing UI after opening new file

    Damian Holubowski
    Damian Holubowski
    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…
    • Answered
    • over 2 years ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • [CONNECT C# Update 16] Create Text-Element and InterCharSpacing resp. CharacterSpacingValue

    Frank Schneller
    Frank Schneller
    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…
    • over 2 years ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • [C# CONNECT Update 16] Automatically create complex shape when the maximum number (5000) of vertices for a shape element is exceeded

    Frank Schneller
    Frank Schneller
    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…
    • over 2 years ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • IBMECObject.GetDoubleValue api is no longer available from Bentley.Building.Mechanical.Components

    Simone Padovan
    Simone Padovan
    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…
    • over 2 years ago
    • OpenPlant | AutoPLANT
    • OpenPlant | AutoPLANT Forum
  • CONNECT C# How to update a text string in a Cell?

    Richard Baker II
    Richard Baker II
    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…
    • over 2 years ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • [CONNECT UPDATE 15 C#] NotificationAdministrator

    Damian Holubowski
    Damian Holubowski
    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…
    • over 2 years ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • [CONNECT UPDATE 15 C#] LineStyle Scale

    Damian Holubowski
    Damian Holubowski
    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…
    • over 2 years ago
    • Developers and Programming
    • Developers and Programming Forum
  • BentleyView Initialization in C#

    Smartplant Automation
    Smartplant Automation
    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…
    • Answered
    • over 2 years ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • [CONNECT C#] Create Associated Dimension to Sub-Element within Shared Cell Instance

    Trevor Watling
    Trevor Watling
    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…
    • over 2 years ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • [CONNECT C#] Text element insert field

    Francesc Calaf
    Francesc Calaf
    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,
    • over 2 years ago
    • MicroStation Programming
    • MicroStation Programming Forum
  • [C#, VB.net CONNECT Update 13] CreateDesignFile method causes an exception

    Paolo Cherubini
    Paolo Cherubini
    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: …
    • over 2 years ago
    • MicroStation Programming
    • MicroStation Programming Forum
>