Browse By Tags

  • [CONNECT C++] Example of SQLite

    The C++ MicroStationAPI provides an interface to SQLite . For example, BeSqlite.h . There is no example of SQLite, unfortunately. Would somebody like to write one?
  • [CONNECT C++] MicroStationAPI Documentation: NEEDSWORK_VANCOUVER_DOC

    Many StateFunc_ functions have incomplete documentation. For example... typedef void(* StateFunc_DragInit)(DPoint3dCP point, int view) UserFunction called when NEEDSWORK_VANCOUVER_DOC. Parameters [in] point NEEDSWORK_VANCOUVER_DOC [in] view NEEDSWORK_VANCOUVER_DOC…
  • [CE MDL/C++] Problems with mdlElmdscr_stroke

    Hi I want to stroke a complex chain element and into an array of points. In V8i I used the function mdlElmdscr_stroke: #define SCALE (mdlModelRef_getUorPerMaster(MASTERFILE)) if (mdlElmdscr_stroke(&pptdPts, &iVertices, pedCurve, 2.0 * SCALE) == SUCCESS…
  • [CONNECT C++ U16.2] Item Type iteration fails

    Hello all, I want to iterate over all Itemtypes in a all Libraries but I get an Memory Exception in the second iteration in following Code: try { ItemTypeLibraryPtr itemTypeLibrary = ItemTypeLibrary::FindByName(libName.c_str(), *ISessionMgr…
  • [CONNECT Update 16 C++] Tag Increment

    When using the copy-and-increment command, MicroStation help tells us: Tag Increment : The amount by which the numeric part of the text element is increased (can be any integer between -32768 and 32767, inclusive). That is, the increment value is a signed…
  • [Connect Up15 c++] Is it possible to click once to place element, pop up UI box, and second click to confirm modification?

    Hello all, I am practicing DgnElementSetTool So far I am able to use _OnDataButton() to place a element. I have the UI box pop up with start of command and could modify the element before I place it with a click. I use _OnDynamicFrame to show effect…
  • Load MDL app on Application Startup (MS_INITAPPS)

    I am facing some issues in Successful loading MDL apps on Startup. I have modified code as below and loaded MDL app. if (strcmp(l_str_argument.c_str(), "MS_INITAPPS") == 0) { mdlSystem_enterGraphics(); mdlInput_sendCommand(CMD_DIALOG_OPENFILE…
  • [Connect C++ MicrostationApi] Problem with changing textelement in cell

    Hello, I am trying to change the Text of a cell with the Microstation C++ Api. The Code I am using is working well on normal Text Elements. But in a Cell the "ReplaceInModel" returns an Error (69645) void TextTool::textChange(EditElementHandleP…
  • how to render solar light shadow to dgn file

    hello, i'm studying how to generate shadow of a solid exposed by solar light. i have got the interface of the default solar, and createed a new one to adjust some parameters, while i cant find the shadow in dgn file. i guess the shadow isnt rendered…
  • [CONNECT C++] Locate Tool: locate closed curve

    I can write a locate tool that enables a user to pick a closed curve (e.g. a DGN shape element). The user must datapoint a line or curve that defines the perimeter of the shape. How can I write a tool that enables a user to pick that same closed curve…
  • [CONNECT C++] DgnElementSetTool::_SetLocateCriteria

    There are no examples that show how DgnElementSetTool::_SetLocateCriteria should be used. The MicroStationAPI doc says: Called from BeginPickElements and BuildAgenda to setup modelRef search list. If _IsModifyOriginal then mdlLocate_normal and mdlLocate_allowSelfRefs…
  • [Connect C++] How to get the color of an element?

    Hello, I have a problem while retrieving the colors of the different geometric parts of an element. For parsing the geometry I'm using the IElementGraphicsProcessor to process the element and retrieve the different graphic primitives types (SolidPrimitives…
  • [Connect C++] list with all the "class name" types of an element

    Hi, Is there a way to get all the class name types that identify elements? Typically for gathering the class name I'm using the following commands: for (DgnECInstancePtr instance : ecMgr.FindInstances(*scope, *ecQuery)) { DgnElementECInstanceP elemInst…
  • [V8i C++] Pick Multiple Elements

    class PickPointsTool : MstnElementSetTool I want to write a tool using the C++ MicroStationAPI supplied with the V8i SDK. The tool should accept multiple point elements (e.g. cells, zero-length lines). Once user has chosen, say, four or more point elements…
  • [CONNECT C++] ListModel Manager for ComboBox and ListBox Hook Classes

    The MicroStationAPI DialogItemHookHandler class lets us write simpler hook handlers for MicroStation dialog items. They let you avoid the giant MDL switch statement in your procedural hook handler code. The ComboBox and ListBox dialog items share the…
  • [CONNECT C++] MicroStationAPI ActiveSettings documentation incorrect

    MicroStationAPI help lists a number of methods under topic Active Settings . For example, static BentleyStatus GetValue (bool &value, ActiveBoolParams paramName) Gets the value of an active MicroStation setting of type boolean However, those methods…
  • [CONNECT C#] CellLibraryInfo Performance

    Versions: OpenRoads Designer and SDK Update 4: 10.04.00.48. And MicroStation Update 10 (10.10.00.32 and SDK 10.10.00.23). I am using CellLibraryCollection and CellLibraryInfo to find cells and I've noticed that it is slow - meaning it takes at least…
  • [CONNECT C++] ISelectionEvents::_OnSelectionEvent

    ISelectionEvents::_OnSelectionEvent has a boolean return value. The MicroStationAPI help says: returns true to stop . True to stop what?
  • [CONNECT C++] AnnotationCellHeaderHandler header file missing

    A recent post has reminded me that class AnnotationCellHeaderHandler is not published. This applies to CONNECT Update 10 and earlier. Its declaration (header file) is missing from the SDK. That was first noted on this Forum in 2017.
  • [CONNECT MicroStationAPI] C++ Objects and Dialog Items

    We write an app. that uses the MicroStationAPI using C++. If that app. has a user interface using MSDialog and dialog items then we must communicate via the Dialog Manager . But the Dialog Manager requires us to publish global variables, which don't fit…
  • [CONNECT C++] Is Element a Solid?

    I'm writing a tool that wants to check whether an element is a solid of some kind. I think that I can do this for a primitive solid (slab, cone, extrusion etc)... const bool DontSimplify { false }; ISolidPrimitivePtr solid = ISolidPrimitiveQuery:…
  • [CONNECT C++] App. version number

    VersionNumber msVersion { 1, 2, 3, 4}; mdlSystem_setMdlAppVersionNumber (nullptr, &msVersion); I put the above in MdlMain() . When I look at app. details in the MDL Applications dialog, the Version is blank. I notice that most delivered applications…
  • RE: [CONNECT C++] DependencyManagerLinkage::IRootsChangedCallback

    Unknown said: YongAn Fu posted a dependency code sample I've written an article about dependency management. It resurrects the BoxDependency example that Mark Anderson wrote in 2001. I've updated the code to use the classes provided in the MicroStationAPI…
  • Including MicroStation API .h files in build

    I am doing some text manipulation in V8i in C++ and am working with some of the structs. One of those is the FontManager.h, located in a MicroStationAPI folder. I added the following to my mke file: dirToSearch=C:/Program Files (x86)/Bentley/MicroStation…
  • CSearchTypes class simplifies Locate and Scan Initialisation

    We often need to work with a given set of MIcroStation element types when writing an application for locating and scanning elements. For example, we may want to work with lines and line-strings, and therefore want our users to be able to... Locate…