Browse By Tags

  • Dgn file hash.

    I am writing an application for MicroStation and ORD under c# I plan to cache specific data to improve the application's startup speed following a session involving a file. In light of this, having access to a file hash would be extremely helpful. Does…
  • accessing the information of the dgn without reading the references with IModel ODBC Driver

    how to get data of dgn model without references another dgn files with ODBC Driver
  • how to read dgn file with Bentley.DgnECPlugin3

    I want to be able to read this dgn file, but when I try to load the Bentley.DgnECPlugin3 plugin, it returns null assembly , in addition to when I try to run the code it throws me the following error I currently have MicroStation CONNECT Edition installed…
  • [C#, ORD 10.12] To change the display style of Eement.

    Hi. I need to change the display style of a element to wireframe. My goal is that view and element have different display style. Do anyone know how to do change display style of element in C# API? Thank you.
  • Copy all cells from one dgnfile to another using C#

    Hi, I would like to loop through all cells from one dgnfile and copy them to another dgnfile. I now have a script that opens a seedfile, so I have two dgnfiles open. One source dgn and one target dgn. The target one is a 2D seed file, because I just…
  • [C#] [Microstation updated 17] - Get element last modified date and user.

    Does the MicroStation API offer a method to retrieve the last modified date and the username for each element? how I can retrieve this data?
  • [CONNECT Update 16 C#] Ellipse to arcs conversion

    Hello, I need to convert ellipses with different Primary and Secondary Axis to multiple arcs with the same Primary and Secondary Axis. In Microstation I can do that using Facet tool but I need to achive the same result doing it programatically. …
  • Getting the diagonal of the bounding box of a model [Microstation Connect 10.60.00.80 C#]

    Hello, I'm trying to get the diagonal of the bounding box of a model. I'm assuming that the DRange3d object is a representation of the bounding box? I'm using the following Code: DgnModel dgnModel; StatusInt statusInt = dgnModel.GetRange(out DRange3d…
  • Dgn to Pdf using Microstation SDK in a C# .Net Project

    I am creating a C# .Net app where I want users to be able to convert a .dgn file to .pdf. Could anyone point me towards some documentation, tutorials or code examples that could show me how to achieve this? Which .dll's are required as references? What…
  • How to get selected element id and display it in WPF form in Bentley.MstnPlatformNET.AddIn

    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…
  • [C# MDL] Create non-static commands, enabling inheritance from a base class

    Hi All, Looking for some advice here on creating MDL commands that allow inheritance from a base class... Reason being I plan to build out a heap of classes that inherit / override methods from a "base" class, to avoid having to manually call these…
  • picking elements from reference files which are not active

    I am working on multiple reference files where I need to get the element Ids of the elements even if that reference file is not active. I am using the below code to pick elements. I am able to get elements that are from active reference file only, when…
  • ProjectWise API accepts incorrect values for Document Code

    Hi Someone who can help me, would be greatly appreciated. Will try to explain in my poor English Has developed a function for sending files with metadata (attribute values) from a document system to a ProjectWise data source. The ProjectWise data…
  • How to select an element in C#

    Hi, I am new to programming Microstation, so sorry for the basic questions. 1) How do I select an object/element (E.g. A line or circle) using the user's mouse? 2) Is there any documentation? E.g. A functions list. Thank you very much in advance…
  • C# MS16 .NET Attach and edit item types to a model

    Hello All Using C# I can create item types and attach them to elements, but cannot see how to attach an set of ItemType properties to a dgn model? I can get to the model as a DgnModel and ModelInfo I can get to my ItemTypeLibrary and ItemType …
  • IBMECObject.GetDoubleValue api is no longer available from Bentley.Building.Mechanical.Components

    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…
  • BentleyView Initialization in C#

    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…
  • Connection Client UserID

    How do I get the users connection client ID (normally company email). I want to use this to validate user for my tools licensing API?
  • Microstation CE addin / How to show a cell element in .net windows form

    hello, I'm trying to show an isometric view of cell element with ElementPreview control into a windows form with no success ! Nothing is shown into the ElementPreview. Here's my c# code extracted from my Microstation CE addin. Can you please advice…
  • [CONNECT C#] Load a Workspace

    Hi, I want to load an existing workspace. It already works with an existing workset. using BD = Bentley.DgnPlatformNET; using BM = Bentley.MstnPlatformNET; // Load Workset BM.Internal.WorkSpaceManager.ActiveWorkSet.WorkSetInfo.Name = myWorksetName;…
  • [CONNECT/(V8i); VBA/C#] Using C# DLLs in a VBA-Project

    Hello, I have a question. Is it possible to make a C# DLL usable in a VBA project and if yes, how? We already tried with the following Link: https://www.geeksengine.com/article/create-dll.html But in that example you have to move a file in to…
  • [CONNECT C#] After ElementPropertiesSetter the Element is locked

    After using ElementPropertiesSetter, the respective element is locked and cannot be unlocked in the MicroStation afterwards. Did I forget something? public bool SetElementLevel(BDE.Element element, string levelName) { try { BD.LevelId levelId…
  • ORD CONNECT Update 8 - C# - Drop Linestyle using ElementGraphicsProcessor

    Hello, I am attempting to "drop" the linestyle of a LineString Element using ElementGraphicsProcessor. Unfortunately, I'm only able to extract and add 2 of the 4 lines to my model. The method I'm using extracts the correct amount of geometry (Count…
  • CONNECT C# reference file masking

    Hi, Is there a way to mask a reference in the new NET API? René
  • [CONNECT C# U12] expand config variable strings

    Good evening, I am looking for a method to expand a string of the form "$(MS_PROJECTDIR)testfolder\$(USERNAME).dgnlib" to its full extent. In VBA there is the ExpandConfigurationVariable function to do that, but I can't find its counterpart in C#…