Browse By Tags

  • [CONNECT .NET] CurveChain Conundrum

    I am using MicroStation CONNECT Update 14.2. I am coding a tool using the DgnPlatformNet and BentleyGeometryNET APIs. Wanting to experiment with the CurveChain class, I wrote this... CurveChain chain = new CurveChain (); To my astonishment, Viz…
  • [CONNECT .NET] how do I Add a TextStyle to a DgnFile?

    DgnFile.GetTextStyles() returns a collection of text styles. How can I add new styles to that list and then assign the list to the active DGN file? There's no method like DgnFile.SetTextStyles(TextStyleCollection styles) that I can see.
  • [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 TextTable from Seed part 2

    Despite advice received elsewhere , I have been unsuccessful in my attempt to clone Paul Connelly wrote: Given your stated goal, CloneAsSeed() is what you want . I'm struggling. Here's a C# method that is supposed to clone a table seed... TextTable…
  • [CONNECT .NET] DgnElementSetTool.DoLocate

    DgnElementSetTool::DoLocate Method has three arguments. The third argument is int complexComponent . complexComponent is not well-documented. Does it take the same values as ComponentMode found in the MicroStationAPI?
  • [CONNECT .NET] MdlApplicationClass

    The MicroStationAPI provides mdlSystem_getMdlAppClass/mdlSystem_setMdlAppClass that inform how the app was loaded (USER, DGNAPP, etc) in one of the MdlApplicationClass enum values. I can't see a .NET equivalent in the MstnPlatformNET.
  • [CONNECT .NET] Problem starting .NET AddIn on earlier version of MicroStation

    I developed an AddIn using the .NET API delivered with MicroStation CONNECT Update 14.2. The AddIn works fine on my computer. When customer attempts to load the AddIn using MicroStation CONNECT Update 10, it fails. The full error dump is attached, but…
  • [CONNECT .NET] SelectionSetManager Events

    The MicroStationAPI provides event handlers for the SelectionSetManager class... void AddListener (ISelectionEvents *selectionListener); void DropListener (ISelectionEvents *selectionListener); The .NET API omits those handlers. Can I request that…
  • [CONNECT .NET] How does MicroStation find assemblies?

    My .NET AddIn uses a third-party assembly Newtonsoft.Json . If you need to read or write JSON files, it's a very useful addition to your toolkit. If I build my app as usual, then load and run it in MicroStation, I get an error: 'Cannot load Newtonsoft…
  • [CONNECT] Distinguish between multiple Tables in a DGN model

    Named Tables I recently came across a situation where a MicroStation CONNECT user had placed several Tables in a DGN model. It occurs to me that there's no simple way to distinguish between tables. For example, let's suppose you place two Tables of…
  • [CONNECT .NET] WPFInteropHelper setting app icon

    I'm writing a .NET AddIn that uses WPF for its user interface. Borrowing from the WPF examples delivered with the SDK, I am able to display a XAML form. The example uses class WPFInteropHelper . WPFInteropHelper.IconName presumably does what it says…
  • [CONNECT .NET] Get list of Multi-Line styles

    Is it possible to get a list of mulit-line styles using .NET? .NET has the MultilineStyle class, but I can't see a way to obtain a list of styles. The MicroStationAPI has mdlMlineStyle_getNameListModel() , carried forward from V8.
  • [CONNECT .NET] Create a TextTable from a Seed

    How do we use .NET method TextTable.CloneAsSeed ? It's non-static, so we must first create a table. Looks like a chicken-and-egg situation.
  • [CONNECT .NET] Find Table Seeds

    A Table Seed is a model in a DGN file. Usually the DGN file is a DGNLib listed in configuration variable MS_DGNLIBLIST . To find a table seed programmatically, I suppose that the procedure looks like this... Examine DGN files found in MS_DGNLIBLIST…
  • [CONNECT .NET] Get File Branding

    I want to get a DGN file's brand (i.e. Its workspace and workset). I've made some progress... if (DgnWorkSetInfo.ExistsOnDgnFile(dgnFile)) { using (DgnWorkSetInfo info = DgnWorkSetInfo.ExtractFromDgnFile(dgnFile)) { string s = $"Workset name '{info…
  • [CONNECT .NET] TextElement.Description: too much information!

    I'm extracting element information from various kinds of element that contain text. I want to describe the element (e.g. Note Element, Text Element, Text Node Element). Element.Description does what I want, except for TextElement . With TextElement…
  • [CONNECT .NET] What does ElementId (ref long value) Do?

    The .NET ElementId constructor requires a long value. But that value is passed by ref . To me, ref implies that the value may be changed inside the ElementId . Why is ref in the constructor?
  • [CONNECT .NET] Text Handler Classes

    The DgnPlatformNet help documents the TextHandlerBase class. It has this note: Base class for text element handlers; should NOT be sub-classed directly (see TextNodeHandler and TextElemHandler) . Unfortunately, neither TextNodeHandler nor TextElemHandler…
  • XML Command Syntax Checker for MicroStation CONNECT

    MicroStation V8i SDK provides ustnxom.exe , used to check the syntax of XML command tables. The command table structure in CONNECT is subtly different to its predecessor. It's easy to make minor spelling or case errors when writing a Commands.xml file…
  • [CONNECT .NET] LsDgnFileMap.Resolve does not exist

    The documentation for LsDgnFileMap has this: If the line style map is a LsDgnFileMap then the LsEntryP that is returned may be a pointer to a stub used to translate from element style number to name. Call LsDgnFileMap::Resolve to find the LsEntry that…
  • [CONNECT .NET] Get Line Style Name from Level

    I want to get the name of the line style that is applied to a DGN element when its style is ByLevel . Thanks to a hint from Maury , I can determine if a line style is ByLevel , but what next? name = LineStyleManager.GetStringFromNumber(propGetter…
  • [CONNECT .NET] User Interface Icons for Element Symbology

    Does the .NET API offer any public icons that we can use in an app's user interface (UI)? The Element Properties dialog, for example, displays icons for element symbology and level...
  • [CONNECT .NET] ElementPropertiesGetter

    I'm using an ElementPropertiesGetter . I can get a colour... ElementPropertiesGetter propertiesGetter = new ElementPropertiesGetter (el); uint colour = propertiesGetter.Color; So far, so good. But, if the element's colour is ByLevel , then how do…
  • [CONNECT .NET] DVector3d is part of Bentley.GeometryNET but Omitted from the Documentation

    The .NET assembly Bentley.GeometryNET provides the DVector3d class, but the BentleyGeometryNET help file has no documentation for that class.
  • [CONNECT .NET] DgnCurveVector, CurvePrimitive and CurveVector

    What does .NET class DgnCurveVector provide that is not available in CurveVector ? DgnCurveVector is described in the BentleyGeometryNET help doc. As far as I can see, DgnCurveVector inherits all its methods and properties from CurveVector and CurvePrimitive…