Browse By Tags

  • [CE U16.2 C#] Bridge between Bentley.Geometry.SolidPrimitive and Bentley.DgnPlatformNET.SolidKernelEntity to use Bentley.DgnPlatformNET.Modify Boolean operations?

    I have a DgnPrimitiveTool derivative that generates solids into a DGN from data in a database as an interpretation of the data. This tool can generate individual Solid elements using the SolidPrimitive.CreateDgnBox(DgnBoxDetail) function with no problem…
  • 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…
  • [ProStructures CE (local build from latest code from RE repo as of 12/27/2021), C#] Error attaching ECData to Element.

    Hi, I am trying to attach data of an ECClass to an element and keep getting this exception: Bentley.Exceptions.EnvironmentalException : CreateInstanceOnElement failed with error code: 6 This is NOT my first ECData class or schema. I have created 3…
  • [CONNECT Ed. 10.15.00.74 C# Addin] VS2019 Commands key-in not loading when following the basic example in the wiki

    I'm following the steps to create a new MDL addin using C# and I'm having an issue with getting the commands.xml to be recognized. VS 2019 (recommendation says for the below version to load VS2017 or higher for .NET programming) Microstation CE 10.15…
  • C# .Net MSTN U16 - Reference File Treat as Element property

    Using MicroStation CONNECT U16 C# .NET trying to check and set the reference file property "Treat As Element" tick option. I can see DgnAttachment has Locate, Snap properties but cannot see the "Treat As Element" Is this Treat as Element option…
  • [CONNECT] EC Schema - Unload

    is there any option to unload / remove a particular schema from the design?
  • [CE U16 C#] Stand alone app opening DgnFile

    Hi, I'm attempting to open a DgnFile (in order to later inspect the geometry contents) using the following code: string fname = @"C:\Users\eaaz3620\Desktop\Testing\TestRead.dgn"; if (System.IO.File.Exists(fname)) { DgnDocument dgnDoc = DgnDocument…
  • c# .Net MS Update 16 - Update text node text in cell

    Can anybody assist with the below, the textnode is within a cell element and have come across a few bugs 1. textline does not update 2. calling textnode.DeleteAllTextLines(); - deletes the entire cell public static void CheckElements(ElementEnumerator…
  • [CONNECT Update 15 C#] How to apply Extension lines offset on programmaticaly generated DimensionElement (new API, namespace Bentley.DgnPlatformNET.Element)

    Hi, I cant' figure out how to correctly draw extensions line with an offset on programmaticaly generated DimensionElement. With the Bentley tool the line are drawn correctly: My code: var dgnFile = Session.Instance.GetActiveDgnFile(); var…
  • [CONNECT UPDATE13 .NET] UnloadAddIn

    OS: Windows 10 Application: MicroStation Connect Edition update 13 - v10.13.01.01 Language of the Application: C# .NET Framework: 4.7.2 Goal: To unload the AddIn when MicroStation Connect closes a file. Workflows to support: Workflow 1…
  • [ C# ] Difference between MicroStation V8i SELECTseries 10 and CONNECT Edition update 15

    Is there a difference for C# MS_INITAPPS to run in MicroStation V8i SELECTseries 10 and CONNECT Edition update 15? Are all of the API calls from the add-in to MicroStation the same in both versions?
  • [Connect Update 15 C#] SmartSolidElement.RaySolidIntersection

    I like this method as it is very fast to execute. But how is it supposed to work exactly? In this example. ray3d is defined with the Origin in the white dot and the Direction defined by the white arrow. The white square defines an empty space inside…
  • [CONNECT UPDATE 15 C#/C++] Attach reference with Geographic Reprojected orientation

    Hello, I need to attach reference with Geographic Reprojected orentation via C# or C++ code. I searched forum but I did not found any help for C#, C++ had some ideas like mdlRefFile_beginAttachmentToModel into mdlRefFile_setIntegerParameters(31, REFERENCE_ATTACHMETHOD…
  • How to close the form correctly?

    Hello everyone! I can't get to programmatically close the form. Each application form is made as described in this comment . Next, I want to close the form from the menu: private void CloseToolStripMenuItem_Click(object sender, EventArgs e) …
  • [C# Connect U14] Transient-Element not working for Parametric Elements

    I used the COM Functions CreateTransientElementContainer1(null, MsdTransientFlags.Overlay, MsdViewMask.AllViews, MsdDrawingMode.Hilite); and AppendCopyOfElement(element); but this doesn't work for Parametric Elements. I tested it with Parametric Volumes…
  • [CONNECT U14 C#] MicrostationDeveloperShell.bat returns \Microsoft unexepected at this time.

    Hello All. First post, please be kind! I'm just getting started with writing plugins for MicroStation, though I typically work on writing plugins for Rhino 3D. My goal is to write plugins in C# with Visual Studio 2019. I've downloaded and installed…
  • [CONNECT U14 C#] Question regarding Element Geometry and Mensuration: What is the Innate unit of MicroStation NET API?

    Hi all, I have a question regarding Element Geometry and Mensuration in the .NET API especially Element-related Classes and Objects under the .NET API using namespaces such as the DgnPlatformNET, GeometryNET, etc. I am currently more familiar with…
  • [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 Update 14 C#] Getting all of the Wall Centerlines from a DGN Drawing Automatically

    Hi everyone, I have a question regarding being able to recognize individual wall elements especially the wall's centerlines in a 2D MicroStation Drawing. My end goal is to use the centerline information of each wall object to recreate the wall in…
  • [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…
  • MSTN CE 14 C#

    Good Afternoon, Looking for help to change the text weight of a table's Title region. I can set the different text style for the Title but not the weight of the text. In the TextTableHandler.h there is S etDefaultTextWeight (UInt32 value);, but haven…
  • [MStn CE U14 C#] How to change table exterior border weight

    I set the default line weight to the interior weight of the table, how do I set the exterior border weight for a table. I looked at the Edge Symbology, but can't figure out how to use it. Help would be greatly appreciated! Thank you, Donna
  • CONNECT API - Is there a C# equivalent of the mdl measure.ma to compute minimum distance between Solid / Surface elements?

    As per title, I want to port this functionality to Generative Components which is written in C#. None of the libraries I could find seemed to perform this operation (aside from calculating distance between 2 points), any advice on how to achieve this…
  • Connect 13 C#

    I am trying to get the line string information from a curve primitive type of line string, I am using the primitive to get the length of the line string and using other methods without any issues. Can someone tell me what I am doing wrong? . Thank…
  • C# MSCE Update 13 Bentley.DgnPlatformNET.DgnPrimitiveTool

    Hi All Using C# in MicroStation CONNECT Update13 Just a quick question: The . DgnPrimitiveTool does not appear to be part of the DgnPlatformNet.dll reference. It works when I reference Bentley.DgnDisplayNet.dll Is this the correct .dll to be…