Browse By Tags

  • Basic DgnFile Usage

    Environment: Windows 10 Enterprise 21H2 .NET Framework 4.6.2 Microstation CONNECT Edition Update 15 v10.15.02.11 mssdk10150076 Good day, this is a two-part question: How can I iterate over the models in a .dgn file, and then over…
  • [Microstation CE Update 17] [C#] | Update buffer | Undo previous change

    I have the next code: public void Update(IDgnECInstance instance, string propertyName, string value) { instance.SetAsString(propertyName, value); instance.WriteChanges(); } How can I enable users to reverse actions performed in my custom form using…
  • [CONNECT Update 17 C#] Set active Multiline Style

    Hi, Is there a way to simply activate a multiline style in MicroStation? Like, for example, the MLINESTYLE ACTIVE <NAME> keyin of the MicroStation does. And then read out the currently active multiline style from the MicroStation again? Regards F…
  • how to start microstation connect edition programmatically in c#

    I currently have this code in C# in a console application, the only thing at the moment is wanting to open microstation connect edition, but unfortunately it throws an error or returns null static void Main(string[] args) { try { Type type1…
  • 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…
  • OpenPlant Modeler CE Update 11 C# - How modify property value of a Saved View

    Hello, I want to modify some properties of the Clip Volume Settings section in a Saved View using C#. The values which I want to apply are items of a list as shown on the picture below. All items are visualized in a dropdown menu. The SetValue method…
  • [CE 10.17.00.209 C#] Replace text in cell

    Hi, I am trying to replace certain TextElements that are contained in a cell using a C# addin (without having to drop the cell first) To accomplish this I find the CellHeaderElement in my drawing, numerate through its children and pick out the specific…
  • How to modify Connect Login dialog in ProjectWise SDK?

    issue: We are in the process of infrastructure migration to the cloud. Upgrade from PWv8i to CONNECT is part of it. To interface PW from the GIS desktop application, we use PW SDK. We found PW Login UI discrepancies between v8i & CONNECT: - CONNECT…
  • Open a .dgn file in background(batch processing)

    Hello all, I am new to Microstation Connect Edition api. I will like to know if we can open a .dgn file in background(batch processing).
  • CE display rule apply to a view C#

    Hi I'm trying to implement a feature to "isolate" elements in drawings. (like on explorer form) my plan is next: 1. Create a display rule foreach (var elementId in elementIdToIsolate) { var elementsConditions = $"element.DgnElementSchema::GraphicalElement…
  • [MS 10.17.00.209. C#] ParametricCellElement.ReplaceInModel returns StatusInt 32768

    Hi, I am trying to create a function that applies a transform to a ParametricCellElement. To do this I first get the basis transform and invert it, then apply both the inverted transform and the new transform I want the cell to get using ApplyTransform…
  • TagElement.GetTagValue() is not returning the values presented in Microstation, what might be wrong? C#

    Hello, I have encountered something I find quite odd. In an application I have written I've used the function GetTagValue() in order to retrieve the value of a TagElement. I have tested this on a few different files and I have gotten the expected…
  • [CE U17] COM/Interop does not release memory

    It's quite similar to https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/201080/mstn-ce-u14-vba-and-com-interop-does-not-release-memory but this time it happens while accessing child elements…
  • [C# MicroStation CE] Prevent entering modal state / close dialogs

    Hi all, I am currently building an application for processing dgn files using IPC (inter-process communication) method. Everything seems to be working quite nicely except for when a modal dialog is created that will block the current thread, preventing…
  • [MSCE C#]winform设置支持停靠后,移动MS主窗体界面会丢失

    各位老师好,我用如下代码设置winform停靠后,在MS主窗体不是最大化的情形下,移动主窗体后该winform界面会异常,请问下是什么原因 private WinFormsInteropHelper m_wndHelper; private WindowContent m_windowContent; public MyForm() { this.m_wndHelper = new WinFormsInteropHelper(this); this.m_wndHelper…
  • [CONNECT U16 C#] How to copy element from one model into a new DGN? (Add-in crashes on dgnFile.ProcessChanges)

    Hi, as a follow-up to this thread , I'm trying to copy an element from an currently opened DGN file to a new temporary DGN file in order to export the single element (normally a cell) as an FBX file. According to suggestions that I've read in this forum…
  • [CONNECT C#] Create text with field

    In C #, is it possible to create a text or text node with the value of an ItemType itself? Microsation allows you to do this manually with edit text tool and insert field from selecting element property. thank you so much,
  • 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…
  • CONNECT C# U16.2 What is the difference in behaviour between Element.GetNativeElementRef() and Element.GetNativeElementRefFromDescr() and when should each be used?

    Hallo, In this post, Jon Summers commented the following: "I notice that there is a similar function public IntPtr GetNativeElementRefFromDescr() . How that differs from GetNativeElementRef() is not clear." Have you since found the difference between…
  • C# - Is there a way to set the workspace/workset of an unopened file?

    Hi all, Is there any way to set the Workspace/Workset of an unopened file in C#? I've read other questions on the forum but haven't found an answer that fits. Thanks a lot in advance! With regards Philip
  • [C# CE] XCommand example solution?

    Does anyone have XCommands built and working in .NET and have some example code they might be able to share? I was looking to test this out, but in the docs it involves messing around with a bmake file and a bunch of xml, which I'm not really sure how…
  • [CE U16 C#] IECPropertyValue - obtain correct units?

    Hi all, I'm building an addin that obtains all of the IDgnECInstance data attached to elements in a collection and exports this; however some of the data gathered is at system resolution whilst other properties is model resolution (x U.O.R). Is there…
  • DgnECManager.Manager.OnInstanceUpdated

    I am trying to use OnInstanceUpdated but it doesn't even hit my breakpoint? (It does update the Schema, and returns Success, but it just seems to remove the element instances.) private DGN.SchemaUpdateStatus UpdateSchema() { try { FindInstancesScope…
  • [CE][C#] Select specific Element from a Parametric Solid

    Hi folks, I want to specifically select an Element of a Parametric Solid. As example I have this Parametric Solid: Now I want the Element behind "Profile #1" that was used for the Extrusion. I have no problems to get all 5 Profiles but I have no Information…
  • 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…