Browse By Tags

  • C# Connect modify textnode element

    When editing a text element and text node element using its TextBlock along with ParagraphProperties and RunProperties, the changes get replaced in the text element but not in the text node element. Not sure why the TextEdit.ReplaceInModel not working…
  • Connect C# Trying to remove the textstyle from text

    I have written a C# program to remove the textstyle from text; I compiled the code in Visual Studio. RunProperties has method "RemoveTextStyle", which I was hoping could be used. Found information that states - Modified RunProperties are used for…
  • Adding Item Type properties to a Text Block

    I am writing a C# add-in for MicroStation CONNECT (Update 11). I found sample code in the MicroStation SDK that allowed me to: 1. Create a Item Type Library. 2. Add an Item Type to the library. 3. Add properties to the Item Type. 4. Attach…
  • [MicroStation 10.14 C#] Create Note dimension element text

    Referencing a previous post about creating dimension elements in C#: https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/112608/c-connect-how-to-create-dimension-elements I've been trying…
  • [CONNECT NET] Create TextNode

    Hello everyone, does anyone know how to create a TextNode in CONNECT C # .NET? many thanks and best regards,
  • [CONNECT C#] Calling mcmMain_getActiveLoginInfo2 from C#

    I'm writing a C# AddIn for MicroStation CONNECT calling the PW API. I want to use mcmMain_getActiveLoginInfo2 to get the PW user name. Here's my interpretation of its.NET declaration... [DllImport("mcm.dll", CharSet = CharSet.Unicode)] public static…
  • Connect Version 14 C# VS 2017

    I am trying to change the text width of the text in a tag value. I am able to update the value but not the font size with the following code: // Replace tag text in model TextEdit textEdit = tagEl.AsTextEdit(); TextPartIdCollection textParts = textEdit…
  • [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;…
  • [C# CONNECT] Undo action in DgnPrimitiveTool

    Hello everyone, I customize the undo option in my custom DgnPrimitiveTool with function EnableUndoPreviousStep and overriding OnUndoPreviousStep and all works correctly but: How can I get back to the Microstation general undo? something like Disable…
  • [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…
  • [CONNECT C#] Problem with Console Mode and BM.Session.Instance.GetActiveFileName()

    Hi, have another question about C #. My AddIn should run directly in the MicroStation (MicroStation mode) and outside in the CMD shell (console mode) So far everything fits in MicroStation mode, only not in console mode. if (call.ModeMicroStation…
  • 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#] Can messages be output in the Windows CMD Shell?

    Hi we want to call our C # AddIn within the MicroStation and in the CMD shell of Windows. That works so far. In GUI mode, I output my messages in the Message Center of the MicroStation. How can I output the same messages in shell mode? There is…
  • [CONNECT U13 C#] A List of all Levels

    Hi, first of all, I'm a C# beginner. How do you get all levels of a DGN with or without attached DGNLIB? With the following code I get the correct number of all levels with or without attached DGNLIB. using BD = Bentley.DgnPlatformNET; public uint…
  • CONNECT C# Loading attachment is not permanent

    Hi, I try to load a reference to my dgn file programmatically. That works, but as soon as I close the window and load the same dgn again, the reference is gone. OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.Filter = "dgn Dateien…
  • [CONNECT U13 C#] ElementChangedEventArgs gives the same element for eventArgs.NewElement and Element.GetFromElementRefAndModelRef(eventArgs.OldElementRef, eventArgs.OldModelRef)

    Hallo, I'm updating an existing suite of tools in a C# Addin that was previously written for V8i to CONNECT. As part of the update I am replacing the COM Interface calls as much as possible with the NET API calls in the CONNECT Edition. I have however…
  • [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#…
  • Connect 13 C# dll in Visual Studio 2017 .net framework 4.6.2

    I have written a program that includes the DgnElementSetTool with OnDynamicFrame drawing the element for user to view before accepting it to add to model. However, I would like the element to follow the cursor if it moves in the view and not require a…
  • [CONNECT U12 C#] use Text favorites to automate Text placement

    Good afternoon, I am currently using Microstation Connect update 12. I am working on some automation projects that involve the use of Items. In standard Microstation we use Text Favorites to connect Item values to text elements. Problem is that I…
  • [CONNECT C#] Managed Equivalents for older COM Interop Calls

    Hallo, I am converting existing add-ins that were written in C# using the COM Interop on V8i SS4 to the new CONNECT NET API and I would like to get rid of any remaining calls to the COM Interface where possible. To achieve that goal, I need to find…
  • [CONNECT C#] Mouse cursor position

    Hi everyone, 1) Does anyone know where are the methods for sending points, resets and tentaive to microstation in the .NET API (in VBA there was SendDataPoint, SendReset, SendTentativePoint in CadInputQueue)? 2) Is there any way to move the cursor…
  • Microstation connect

    We have developed some MDL Applications using Pseudo code in V8. As our management decided to purchase Microstation Connect Edition beginning of Jan 2021. (Budget problems) In order to save time, Can we do the MDL migration in two stages, Stage 1 (During…
  • C# Add-In Examples

    I just posted some sample Add-Ins to my Github site: https://github.com/DaveBrumbaugh/MostOfDavesClasses-CSharp-Wrappers-For-ProjectWise/tree/master/Samples/MSCE-AddIns You'll need MostOfDavesClasses.cs from the root of the site to build them. The samples…
  • C# Connet

    In the DgnElementSetTool class of my C# program, I use Bentley.DgnPlatformNET.Elements.Element GetHeadElement() to locate an element. I tried to cast a Bentley.DgnPlatformNET.Elements.Element of type Line or LineString to a MicroStationDGN.Element and…
  • Connect Edition 13 C# dll

    I have created a C# dll with a form and key-in to run it again, since the dll cannot be unloaded once loaded in the currently running Connect. I use the mdl load command to load the program (program works correctly) and I can see the key-in is available…