Functions
mdlSystem Functions

Functions

int mdlSystem_checkExtendedAbort (int completeValue, int currentValue)
 Queries MicroStation for whether the user has requested an abort. More...
 
int mdlSystem_abortRequested ()
 The callbacks that can be set using mdlSystem_setFunction. More...
 
void mdlSystem_cancelTimer (int timerHandle)
 Halt the timer action that was previously set with mdlSystem_setTimerFunction. More...
 
MSTNTOOLS_EXPORT unsigned long mdlSystem_getTicks ()
 Gets a tick count from an arbitrary start time. More...
 
void mdlSystem_closeDesignFile ()
 Close the current design file. More...
 
void mdlSystem_freeFileThumbnail (byte **imagePP)
 Free the memory occupied by the specified thumbnail image. More...
 
void mdlSystem_displayFileThumbnail (MSWindowP gwP, BSIRect *rectP, byte *imageP)
 Display the specified thumbnail image in the given rectangle. More...
 
bool mdlSystem_openFileThumbnail (DgnPlatform::DgnFileFormatType *pFormat, int *pMajorVersion, int *pMinorVersion, bool *pDefaultModelIs3D, WCharCP fileName, byte **image, int *imageSize)
 Open the thumbnail image for the specified file. More...
 
void mdlSystem_compressDgnFile ()
 Compress the master DGN file. More...
 
void mdlSystem_compressLibrary ()
 Compress the currently attached cell library. More...
 
int mdlSystem_createStartupElement (MSElementP outElemP, char *startupString)
 Create a MicroStation start-up element to be placed in the design file. More...
 
int mdlSystem_deleteStartupElement (char *programNameP)
 Find all start-up elements in the current DGN file that start programNameP. More...
 
bool mdlSystem_isGraphicsInitialized ()
 Check if graphics have been initialized. More...
 
void mdlSystem_enterGraphics ()
 Initialize graphics. More...
 
void mdlSystem_enterGraphicsExtended (int flags)
 Serves the same purpose as mdlSystem_enterGraphics, except that it allows applications to initialize MicroStation's graphics environment without displaying design files. More...
 
void mdlSystem_exit (int exitStatus, int exit)
 Terminate the current MDL task. More...
 
void mdlSystem_scheduleUnload (MdlDesc *mdlDescriptor, bool silent, int unloadStatus)
 
Immediately disconnects nearly all hook functions for the current MDL application

so the application will not be called again, and queues an CMD_MDL_UNLOAD command so the application will be unloaded as soon as possible. More...

 
int mdlSystem_fileDesign ()
 
The mdlSystem_fileDesign function produces the same result

as selecting Save Settings from the File menu. More...

 
UInt32 mdlSystem_updateGraphicGroup ()
 Updates the current graphic group number. More...
 
int mdlSystem_updateCurrentNode ()
 Updates the current text node number and saves the new value to the design file. More...
 
MdlDescmdlSystem_findMdlDesc (WCharCP nameP)
 
The mdlSystem_findMdlDesc function gets a pointer to the

MDL descriptor with given task ID. More...

 
int mdlSystem_getChar ()
 The mdlSystem_getChar function polls the keyboard looking for a character. More...
 
MdlDescmdlSystem_getCurrMdlDesc ()
 
The mdlSystem_getCurrMdlDesc gets a pointer to the MDL descriptor of

the currently active MDL application. More...

 
WCharCP mdlSystem_getCurrTaskID ()
 
The mdlSystem_getCurrTaskID function returns a pointer to the task ID of the

application that calls it. More...

 
WCharCP mdlSystem_getMdlTaskID (MdlDesc *mdlDescP)
 
The mdlSystem_getMdlTaskID function gets a pointer to the task ID of the

application identified by mdlDescP. More...

 
void mdlSystem_getMdlTaskList (bvector< WString > &taskList)
 
The mdlSystem_getMdlTaskList function generates a list of installed MDL task

names. More...

 
int mdlSystem_getTaskStatistics (MdlAppStatistics *statisticsP, WCharCP taskIdP)
 
The mdlSystem_getTaskStatistics function collects statistics on the task specified

by taskIdP. More...

 
int mdlSystem_createCfgVarDump ()
 the function mdlSystem_createCfgVarDump() allows developers and administrators to produce live/point-in-time MicroStation configuration text dump files. More...
 
int mdlSystem_loadMdlProgram (WCharCP pathP, WCharCP taskIdP, WCharCP pArgument)
 Load the program specified by taskIdP from the resource file specified by appFileP. More...
 
MdlDescmdlSystem_getMdlDescFromProcessNumber (long processNumber)
 Return the process number of the specified MDL task. More...
 
MdlDescmdlSystem_nextMdlApp (MdlDesc *descP)
 Allow an MDL program to step through MicroStation's list of MDL tasks. More...
 
int mdlSystem_newDesignFile (WCharCP fileName)
 Open a Design File after closing the open (active) design file. More...
 
int mdlSystem_newDesignFileAndModel (WCharCP fileName, WCharCP modelName)
 Open the specified model in the specified design file after closing the open (active) design file. More...
 
int mdlSystem_exchangeDesignFile (WCharCP fileName, UInt32 option)
 Open a file as the master file while retaining the view configuration of the current master file. More...
 
int mdlSystem_exchangeDesignFileAndModel (WCharCP fileName, WCharCP modelName, UInt32 option)
 Open a file as the master file while retaining the view configuration of the current master file. More...
 
int mdlSystem_exchangeToReference (DgnModelRefP modelRef, UInt32 option)
 Opens the file and model as specified by the reference modelRef as the master file, while retaining the view configuration of the current master file. More...
 
int mdlSystem_saveDesignFile ()
 Save all pending changes to the active design file. More...
 
StatusInt mdlSystem_upgradeDesignFile (WCharCP designFileName)
 Upgrade a DGN file from a previous version to the current version. More...
 
void mdlSystem_pauseTicks (int sixtieths)
 Pause the MDL program and MicroStation for at least the specified interval. More...
 
long mdlSystem_getProcessNumberFromMdlDesc (MdlDesc *mdlDesc)
 Return the process number of the specified MDL task. More...
 
static SystemFunc_UnloadProgram SetUnloadProgramFunction (SystemFunc_UnloadProgram unloadFunction)
 An MDL application can use this to set a function to be called when the application is about to be unloaded. More...
 
static SystemFunc_ReloadProgram SetReloadProgramFunction (SystemFunc_ReloadProgram newFunc)
 An MDL application can use this to set a function to be called when there is another request to load it. More...
 
static
SystemFunc_MdlChildTerminated 
SetMdlChildTerminatedFunction (SystemFunc_MdlChildTerminated unloadFunction)
 An MDL application can use this to set a function to be called when the a child MDL application is unloaded. More...
 
static SystemFunc_AllMdlUnloads SetAllMdlUnloadsFunction (SystemFunc_AllMdlUnloads unloadFunction)
 An MDL application can use this to set a function to be called whenever any MDL application unloads. More...
 
static SystemFunc_MenuBarChange SetMenuBarChangeFunction (SystemFunc_MenuBarChange newFunc)
 Set a function that is called when the main menu bar is changed via a call to mdlDialog_menuBarActivate. More...
 
static SystemFunc_WindowClose SetWindowCloseFunction (SystemFunc_WindowClose newFunc)
 Set a function that is called when a window is about to be closed. More...
 
static SystemFunc_CmdWindowOpen SetCmdWindowOpenFunction (SystemFunc_CmdWindowOpen newFunc)
 Set a function that is called when the Status Bar or Command Window has been opened. More...
 
static
SystemFunc_WindowsKeystrokeMessage 
SetWindowsKeystrokeMessageFunction (SystemFunc_WindowsKeystrokeMessage newFunc)
 Set a function that is called for all keystroke related messages from Windows. More...
 
static
SystemFunc_MessageCenterWrite 
SetMessageCenterWriteFunction (SystemFunc_MessageCenterWrite newFunc)
 Set a function that is called when a message is written to the Message Center. More...
 
static SystemFunc_PromptOutput SetPromptOutputFunction (SystemFunc_PromptOutput newFunc)
 Set a function that is called when a prompt is output to the Status Bar. More...
 
static SystemFunc_StatusOutput SetStatusOutputFunction (SystemFunc_StatusOutput newFunc)
 Set a function that is called when a status message is output to the Status Bar. More...
 
static
SystemFunc_ApplicationAreaChange 
SetApplicationAreaChangeFunction (SystemFunc_ApplicationAreaChange newFunc)
 Set a function that is called when the Application Area has changed. More...
 
static SystemFunc_DialogFind SetDialogFindFunction (SystemFunc_DialogFind newFunc)
 Set a function that is called during a mdlDialog_findByTypeAndId call. More...
 
static SystemFunc_ElmDscrToFile SetElmDscrToFileFunction (SystemFunc_ElmDscrToFile newFunc)
 Set a function that is called before an element descriptor is written to a model to allow applications to modify the element or block the operation. More...
 
static SystemFunc_ColorMapChange SetColorMapChangeFunction (SystemFunc_ColorMapChange newFunc)
 Set a function that is called when a color table is attached or modified. More...
 
static SystemFunc_FenceChanged SetFenceChangedFunction (SystemFunc_FenceChanged newFunc)
 Set a function that is called when a fence is defined or cleared. More...
 
static SystemFunc_ElmDscrCopy SetElmDscrCopyFunction (SystemFunc_ElmDscrCopy newFunc)
 Set a function that is called when an element is being copied between models. More...
 
static SystemFunc_CreateLibraryCell SetCreateLibraryCellFunction (SystemFunc_CreateLibraryCell newFunc)
 Set a function that is called whenever someone creates a cell in a cell library using the old method of placing a fence and orign and creating a cell. More...
 
static SystemFunc_CellLibraryChange SetCellLibraryChangeFunction (SystemFunc_CellLibraryChange newFunc)
 Set a function that is called whenever a cell library is attached or detached. More...
 
static SystemFunc_AcsOperation SetAcsOperationFunction (SystemFunc_AcsOperation newFunc)
 Set a function that is called when an ACS is created, deleted, or modified. More...
 
static SystemFunc_LockChanged SetLockChangedFunction (SystemFunc_LockChanged newFunc)
 Set a function that is called when the state of an active lock changes. More...
 
static
SystemFunc_ActiveParamChanged 
SetActiveParamChangedFunction (SystemFunc_ActiveParamChanged newFunc)
 Set a function that is called when the state of an active parameter changes. More...
 
static
SystemFunc_UpdateSequenceChanged 
SetUpdateSequenceChangedFunction (SystemFunc_UpdateSequenceChanged newFunc)
 Set a function that is called when the model update sequence is defined or modified. More...
 
static
SystemFunc_MultilineStyleChanged 
SetMultilineStyleChangedFunction (SystemFunc_MultilineStyleChanged newFunc)
 Set a function that is called each time a multi-line style is added, deleted, or updated in a file. More...
 
static SystemFunc_DimStyleChange SetDimStyleChangeFunction (SystemFunc_DimStyleChange newFunc)
 Set a function that is called each time a dimension style is added, deleted, or updated in a file. More...
 
static SystemFunc_TextStyleChange SetTextStyleChangeFunction (SystemFunc_TextStyleChange newFunc)
 Set a function that is called each time a text style is added, deleted, or updated in a file. More...
 
static SystemFunc_SymbologyChanged SetSymbologyChangedFunction (SystemFunc_SymbologyChanged newFunc)
 Set a function that is called whenever the active symbology (color, style, weight) is changed. More...
 
static SystemFunc_WorkspaceChanged SetWorkspaceChangedFunction (SystemFunc_WorkspaceChanged newFunc)
 Set a function that is called when the workspace, project, or interface changes. More...
 
static
SystemFunc_TaskNavigationTaskChanged 
SetTaskNavigationTaskChangedFunction (SystemFunc_TaskNavigationTaskChanged newFunc)
 Allows you to be notified after the current UI task (e.g. More...
 
static
SystemFunc_MainToolBoxTaskChanged 
SetMainToolBoxTaskChangedFunction (SystemFunc_MainToolBoxTaskChanged newFunc)
 Allows you to be notified after the current UI "main" task (e.g. More...
 
static
SystemFunc_TaskNavigationTaskChanging 
SetTaskNavigationTaskChangingFunction (SystemFunc_TaskNavigationTaskChanging newFunc)
 Allows you to be notified before the current UI task is changed. More...
 
static
SystemFunc_ActiveElementTemplateChanged 
SetActiveElementTemplateChangedFunction (SystemFunc_ActiveElementTemplateChanged newFunc)
 Allows you to be notified after the active Element Template is changed. More...
 
static SystemFunc_ClipboardUpdated SetClipboardUpdatedFunction (SystemFunc_ClipboardUpdated newFunc)
 Allows you to be notified when the Clipboard has been updated. More...
 
static SystemFunc_DgnLibsChanged SetDgnLibsChangedFunction (SystemFunc_DgnLibsChanged newFunc)
 Allows you to be notified when the set of DgnLibs has changed. More...
 
static
SystemFunc_RibbonBackstageOpened 
SetRibbonBackstageOpenedFunction (SystemFunc_RibbonBackstageOpened newFunc)
 Allows you to be notified when the Ribbon's Backstage is opened. More...
 
MdlApplicationClass mdlSystem_setMdlAppClass (WCharCP taskIdP, MdlApplicationClass newClass)
 Modify the application class of a loaded MDL application. More...
 
MdlApplicationClass mdlSystem_getMdlAppClass (MdlDescP mdlDesc)
 Retrieves the application class of the specified MDL application. More...
 
int mdlSystem_setTimerFunction (int *timerHandleP, long duration, MdlTimerFuncP funcP, intptr_t argument, int continuous)
 Designate a timer function to be called after duration timer ticks. More...
 
int mdlSystem_unloadMdlProgram (WCharCP pName)
 Unload the MDL program specified by taskIdP. More...
 
int mdlSystem_userAbortEnable (int enable)
 Control whether the user can abort an MDL task. More...
 
void mdlSystem_startBusyCursor ()
 
Change the graphical cursor to a form which indicates to the user that work is in progress and that the user should

wait for the operation to complete More...

 
void mdlSystem_stopBusyCursor ()
 Change the cursor back to normal following a call to mdlSystem_startBusyCursor. More...
 
int mdlSystem_getCursorPosition (DPoint3dP position, int *qualifierMaskP, MSWindowP *gwP, int *region, DPoint3dP dpUorsP)
 Return information about the current position of the cursor. More...
 
int mdlSystem_checkButtonHit ()
 Determine whether a mouse button has been pressed. More...
 
int mdlSystem_checkKeyHit ()
 Determines whether a keyboard key has been pressed. More...
 
bool mdlSystem_checkMouseMove (Point2d *newPoint)
 Determines whether the mouse has been moved. More...
 
void mdlSystem_extendedAbortEnable (bool enable)
 
mdlSystem_extendedAbortEnable and mdlSystem_extendedAbortRequested allow

an MDL application to check for a user abort using the same mechanism as MicroStation's update and fence processing. More...

 
int mdlSystem_extendedAbortRequested ()
 
mdlSystem_extendedAbortEnable and mdlSystem_extendedAbortRequested allow

an MDL application to check for a user abort using the same mechanism as MicroStation's update and fence processing. More...

 
int mdlSystem_computeDesignRange (Dpoint3d *minP, Dpoint3d *maxP, bool *elementFoundP, int view, RotMatrixP rotMatrixP, DgnModelRefListP fitList)
 Compute the range of design file geometry. More...
 
int mdlSystem_getFreeDiskSpace (Int64 *pTotalBytes, Int64 *pFreeBytes, WCharCP fileSys)
 Get the amount of available disk space from the specified system drive volume. More...
 
void mdlSystem_setApplicationTitle (WCharCP fileName)
 Set the title string in the main application window title bar. More...
 
int mdlSystem_registerCommandNumbers (MdlCommandNumber *pNumbers)
 Register functions with the mdl runtime engine. More...
 
int mdlSystem_registerCommandNumbersByDesc (struct mdlDesc *pDesc, MdlCommandNumber *pNumbers)
 Register functions with the mdl runtime engine. More...
 
int mdlSystem_registerCommandNames (MdlCommandName *pNamess)
 Register functions with the mdl runtime engine. More...
 
int mdlSystem_registerCommandNamesByDesc (struct mdlDesc *pDesc, MdlCommandName *pNames)
 Register functions with the mdl runtime engine. More...
 
bool mdlSystem_startedAsAutomationServer ()
 Determine whether MicroStation was started as an Automation Server. More...
 
StatusInt mdlSystem_saveDesignFileAs (WCharCP pFileName, DgnFileP dgnFileObj, DgnPlatform::DgnFileFormatType format, bool convertRefs)
 Save a file file object to a different file or a different format. More...
 
void mdlSystem_setMdlAppVersionNumber (MdlDesc *mdlDescP, VersionNumber *pVersionNumber)
 Sets an MDL application's version number. More...
 
void mdlSystem_getMdlAppVersionNumber (MdlDesc *mdlDescP, VersionNumber *pVersionNumber)
 Retrieves an MDL application's version number. More...
 
void mdlSystem_getBatchProcessingFile (WCharP fileName, int bufferLength)
 This function is meant to be called during the Batch Processing "Analyze File" state. More...
 
WCharCP mdlSystem_getApplicationPath (WCharCP taskIdP)
 Returns a pointer to the full path of the MicroStation resource file that contains the MDL application. More...
 
bool mdlSystem_isRunningWinXPorLater ()
 Checks if the operating system is Windows XP or later. More...
 
bool mdlSystem_isRunningVistaorLater ()
 Checks if the operating system is Windows Vista or later. More...
 
bool mdlSystem_isRunningWin7orLater ()
 Checks if the operating system is Windows 7 or later. More...
 
bool mdlSystem_isRunningWin8orLater ()
 Checks if the operating system is Windows 8 or later. More...
 
bool mdlSystem_isRunningWin10orLater ()
 Checks if the operating system is Windows 10 or later. More...
 
bool mdlSystem_isRunningInRemoteSession ()
 Detects whether the product is running in a Remote Desktop Services client session. More...
 
bool mdlSystem_isDropShadowSupported ()
 Detects whether drop-shadows are supported by the OS. More...
 
void mdlSystem_pumpMessages ()
 
Enters a message pumping loop to be used during long processes, indicating

to the OS that the application is still responsive. More...

 
void mdlSystem_pumpMessagesEx (unsigned long minTicks)
 
Identical to mdlSystem_pumpMessages except that the message pumping loop 

is only executed if at least minTicks ticks have elapsed since the last message pump More...

 
void mdlSystem_ignoreNextEraseBkGnd ()
 Ignores the next WM_ERASEBKGND Windows message for a child window. More...
 
UInt32 mdlSystem_incrementLockCount (MdlDesc *mdlDesc)
 Increments a lock count. More...
 
UInt32 mdlSystem_decrementLockCount (MdlDesc *mdlDesc)
 Decrements a lock count. More...
 
IGlobalPositionSourceP mdlSystem_getGlobalPositionSource ()
 Retrieves the C++ object that implements the IGlobalPositionSource interface. More...
 
StatusInt mdlWindow_getDefaultDialogFont (WStringR fontName, int &fontHeight, int &fontWeight, bool &fontFixed)
 Gets the default dialog font taking the locale into account. More...
 
StatusInt mdlWindow_getDefaultCaptionFont (WStringR fontName, int &fontHeight, int &fontWeight, bool &fontFixed)
 Gets the default caption font taking the locale into account. More...
 

Detailed Description

Function Documentation

int mdlSystem_abortRequested ( )

The callbacks that can be set using mdlSystem_setFunction.

Controls whether the user can abort an MDL task. If an MDL task never calls mdlSystem_userAbortEnable, the user can abort the MDL task by pressing <Ctrl-C>. The MDL task can disable this capability by calling mdlSystem_userAbortEnable with an argument of 0. The MDL task can enable this capability by calling mdlSystem_userAbortEnable with a non-zero argument. By default, this capability is enabled.

Remarks
An MDL task can call mdlSystem_abortRequested to determine whether the user has tried to abort the task. mdlSystem_abortRequested works even if the task disables the abort capability. mdlSystem_abortRequested does not actually abort the task. It simply allows the task to determine whether an abort has been requested.
Returns
A non-zero value if the user requested an abort.
See also
mdlSystem_extendedAbortEnable mdlSystem_extendedAbortRequested
Remarks
Required Library: mdlbltin.lib
void mdlSystem_cancelTimer ( int  timerHandle)

Halt the timer action that was previously set with mdlSystem_setTimerFunction.

Parameters
[in]timerHandlea unique integer handle for the timer to be canceled.
Remarks
An MDL application can have multiple timers simultaneously. When an MDL application exits, all of its timers are automatically canceled.
See also
userSystem_timerExpired mdlSystem_getTicks
Remarks
Required Library: mdlbltin.lib
int mdlSystem_checkButtonHit ( )

Determine whether a mouse button has been pressed.

Returns
true if a mouse button has been pressed.
Remarks
Required Library: mdlbltin.lib
See also
mdlSystem_checkKeyHit
int mdlSystem_checkExtendedAbort ( int  completeValue,
int  currentValue 
)

Queries MicroStation for whether the user has requested an abort.

Remarks
Often this function is called in an event loop, or after extended processing has caused the user to wait. This function should be preceeded with a call to mdlSystem_userAbortEnable(true).
Returns
MDLERR_USERABORT if the user aborted, or false if not.
See also
mdlSystem_userAbortEnable
int mdlSystem_checkKeyHit ( )

Determines whether a keyboard key has been pressed.

Returns
true if a keyboard key has been pressed.
See also
mdlSystem_checkButtonHit
bool mdlSystem_checkMouseMove ( Point2d *  newPoint)

Determines whether the mouse has been moved.

Parameters
[out]newPointthe new position of the mouse pointer.
Returns
true if the mouse has been moved.
Remarks
Required Library: mdlbltin.lib
See also
mdlSystem_checkKeyHit
void mdlSystem_closeDesignFile ( )

Close the current design file.

If no MS_INITAPPS applications are installed, mdlSystem_closeDesignFile terminates MicroStation. Otherwise, the MS_INITAPPS task is resumed.

Remarks
Required Library: mdlbltin.lib
void mdlSystem_compressDgnFile ( )

Compress the master DGN file.

This action frees wasted disk space for the DGN file. This is equivalent to executing the MicroStation COMPRESS DESIGN command.

Remarks
Required Library: mdlbltin.lib
void mdlSystem_compressLibrary ( )

Compress the currently attached cell library.

The mdlSystem_compressDgnFile function does the same thing for the current master DGN file.

Remarks
Required Library: mdlbltin.lib
int mdlSystem_computeDesignRange ( Dpoint3d minP,
Dpoint3d maxP,
bool *  elementFoundP,
int  view,
RotMatrixP  rotMatrixP,
DgnModelRefListP  fitList 
)

Compute the range of design file geometry.

This function scans through the file(s) and computes the union of the element range blocks, in a similar manner to the MicroStation "fit" command.

Parameters
[out]minPpoints to the range minimum
[out]maxPpoints to the range maximum.
[out]elementFoundPpoints to an integer that is set to true if an element is found. If no elements are found, the range values are not valid.
[in]viewif it is not negative, only elements displayed in view are processed. The range calculations are performed in a coordinate system rotated by the inverse of the view rotation matrix (unless overridden with rotMatrixP).
[in]rotMatrixPis a pointer to a rotation matrix for the range calculations. If NULL is passed (and view is negative), the range calculations are performed in design file coordinates (no rotation).
[in]fitListif it is NULL, the master file and all reference files are processed, otherwise it points to a BitMask that controls the files that are processed.
Returns
mdlSystem_computeDesignRange returns SUCCESS if the range is calculated successfully and an appropriate error code otherwise.
Remarks
Required Library: mdlbltin.lib
int mdlSystem_createCfgVarDump ( )

the function mdlSystem_createCfgVarDump() allows developers and administrators to produce live/point-in-time MicroStation configuration text dump files.

Returns
SUCCESS if the function dumps configuration variables in a text file successfully. Otherwise, it returns a non-zero value.
Remarks
Required Library: mdlbltin.lib
int mdlSystem_createStartupElement ( MSElementP  outElemP,
char *  startupString 
)

Create a MicroStation start-up element to be placed in the design file.

After creating a startup element, use the mdlElement_add function to add it to the design file.

Parameters
[out]outElemPthe created element
[in]startupStringshould contain the exact string the user needs to start the program. It can contain command line arguments that are passed to the MDL program when it is started.
Remarks
If MicroStation finds a startup element when loading a design file, it queues a command to start the MDL program. Once MicroStation has completely loaded the design file, it begins processing all queued commands, including commands resulting from startup elements.
Returns
The mdlSystem_createStartupElement returns zero if it is successful. If the specified string is over 1000 characters, the function returns MDLERR_BADSTRING.
See also
mdlElement_add
Remarks
Required Library: mdlbltin.lib
UInt32 mdlSystem_decrementLockCount ( MdlDesc mdlDesc)

Decrements a lock count.

If the MDL application's lock count is greater than zero, MicroStation will not unload it unless MicroStation is shutting down

Parameters
[in]mdlDescpoints to an MDL descriptor; cannot be NULL
Remarks
Required Library: mdlbltin.lib
If the lock count is zero prior to the call, it returns without changing the lock count.
Returns
The value of the application's lock count after decrementing.
int mdlSystem_deleteStartupElement ( char *  programNameP)

Find all start-up elements in the current DGN file that start programNameP.

The function then deletes these elements.

Parameters
[in]programNamePprogram name
Returns
The mdlSystem_deleteStartupElement function returns zero if it is successful. If the specified string is empty or too long, the function returns MDLERR_BADSTRING.
See also
mdlElement_add
Remarks
Required Library: mdlbltin.lib
void mdlSystem_displayFileThumbnail ( MSWindowP  gwP,
BSIRect *  rectP,
byte imageP 
)

Display the specified thumbnail image in the given rectangle.

Parameters
[in]gwPthe MSWindow pointer indicating the window to display the image in
[in]rectPthe rectangle in which to display the image
[in]imagePthe image to display. Must be a pointer to a BITMAPFO structure.
Remarks
Required Library: mdlbltin.lib
See also
mdlSystem_freeFileThumbnail
void mdlSystem_enterGraphics ( )

Initialize graphics.

If graphics have been initialized, mdlSystem_enterGraphics returns. This function is intended for programs started before MicroStation initializes graphics.

See also
mdlSystem_enterGraphicsExtended mdlSystem_newDesignFile mdlSystem_closeDesignFile
Remarks
Required Library: mdlbltin.lib
void mdlSystem_enterGraphicsExtended ( int  flags)

Serves the same purpose as mdlSystem_enterGraphics, except that it allows applications to initialize MicroStation's graphics environment without displaying design files.

This is useful, for example, in INITAPPS applications that process design files and want to display dialog boxes, but don't want the drawing displayed on the screen.

Parameters
[in]flagsWhether MicroStation displays design file views or not. If flags is 0, MicroStation does display them, if flags is 1 it does not. Other values for flags are reserved.
See also
mdlSystem_enterGraphics
Remarks
Required Library: mdlbltin.lib
int mdlSystem_exchangeDesignFile ( WCharCP  fileName,
UInt32  option 
)

Open a file as the master file while retaining the view configuration of the current master file.

This provides a convenient way to switch the role of master and reference files without changing the view configuration. mdlSystem_exchangeDesignFile provides the same functionality as the EXCHANGEFILE command (XD=).

Parameters
[in]fileNameparameter specifies the name of the file which is to be opened as the master file.
[in]optionparameter specifies options for the function. At present there are no options.
Returns
mdlSystem_exchangeDesignFile returns SUCCESS if no errors occur.
See also
mdlSystem_newDesignFile
Remarks
In versions of MicroStation prior to 08.09, the option argument could be set to 1 to prevent updating the new file. That option is no longer supported.
Required Library: mdlbltin.lib
int mdlSystem_exchangeDesignFileAndModel ( WCharCP  fileName,
WCharCP  modelName,
UInt32  option 
)

Open a file as the master file while retaining the view configuration of the current master file.

This provides a convenient way to switch the role of master and reference files without changing the view configuration. mdlSystem_exchangeDesignFile provides the same functionality as the EXCHANGEFILE command (XD=).

Parameters
[in]fileNameparameter specifies the name of the file which is to be opened as the master file.
[in]modelNamespecifies the model within the file. If this modelName is NULL, the model that was active during the most recent "save settings" operation is opened.
[in]optionparameter specifies options for the function. At present there is only one option supported. Set option to 1 to indicate that an update is not to be performed.
Returns
mdlSystem_exchangeDesignFileAndModel returns SUCCESS if no errors occur.
See also
mdlSystem_newDesignFile
Remarks
Required Library: mdlbltin.lib
int mdlSystem_exchangeToReference ( DgnModelRefP  modelRef,
UInt32  option 
)

Opens the file and model as specified by the reference modelRef as the master file, while retaining the view configuration of the current master file.

This provides a convenient way to switch the role of master and reference files without changing the view configuration. mdlSystem_exchangeDesignFile provides the same functionality as the REFERENCE EXCHANGE command.

Parameters
[in]modelRefparameter specifies the name reference file that is to be opened as the master file.
[in]optionparameter specifies options for the function. At present there is only one option supported. Set option to 1 to indicate that an update is not to be performed.
Returns
mdlSystem_exchangeToReference returns SUCCESS if no errors occur.
See also
mdlSystem_newDesignFile
Remarks
Required Library: mdlbltin.lib
void mdlSystem_exit ( int  exitStatus,
int  exit 
)

Terminate the current MDL task.

MDL does not return to the MDL task. An MDL task can use this function to abort regardless of how deeply it is nested in function calls.

Parameters
[in]exitStatusis the function's exit status. If the MDL task was started by another MDL task, the exit status is returned to the parent task.
[in]exit1 means unload
Returns
The mdlSystem_exit function does not return to the MDL task.
Remarks
A non-zero value for unload tells MDL to unload the program. If unload is zero, MDL aborts the MDL task and reinitializes the stack pointer.
If the program is unloaded, MDL frees all memory, flushes, and closes all files opened by the MDL task. There are two known exceptions to this: element descriptors and string lists. An MDL program must specifically free all of the string lists and element descriptors created for it. Use the mdlElmdscr_freeAll function to free element descriptors. Use mdlStringList_destroy to free memory allocated through string list functions.
If the program remains loaded, MDL performs no clean-up other than resetting the stack pointer to the initial value. Remarks Please keep the following points in mind when using mdlSystem_exit and exit: It is very dangerous to call exit or mdlSystem_exit from any hook function. It is better to queue a request to unload the application. See the application described in the "A Complete Example" chapter of the MDL Programmer's Guide for an example of how to do this. It queues an unload request when it receives DIALOG_MESSAGE_DESTROY message. If your application needs to set an exit code, then your application can queue a command to itself and then in the command it can call exit or mdlSystem_exit. To detect problems related to calling exit or mdlSystem_exit at an improper time, run MicroStation with MS_DEBUGHEAP set to 1 and MS_DEBUGMDLHEAP set to ALL or the name or your application. See the "Debugging" chapter of the MDL Programmer's Guide for more information on these environment variables.
This is an obsolete function. Use the standard function "exit" instead.
Do not use this function from an MDL application written in native code.
See also
userSystem_mdlChildTerminated
Remarks
Required Library: mdlbltin.lib
void mdlSystem_extendedAbortEnable ( bool  enable)

mdlSystem_extendedAbortEnable and mdlSystem_extendedAbortRequested allow

an MDL application to check for a user abort using the same mechanism as MicroStation's update and fence processing.

This lets the user abort a process using Escape, Reset or <Ctrl-C>. The other methods of signaling abort limit the user to pressing <Ctrl-C> to abort the application.

Parameters
[out]enabletrue to enable, false to disable
Remarks
If enable is true, MicroStation turns on the extended abort processing. In doing so, it resets the MicroStation flag that indicates whether an abort has been requested. It also turns off the standard abort processing for that application by calling mdlSystem_userAbortEnable with an argument of 0.
If enable is false, MicroStation turns off extended abort processing. In doing so, it does not reset the MicroStation flag that indicates whether an abort has been requested. That value can still be tested using mdlSystem_extendedAbortRequested. MicroStation also enables standard abort processing for the application by calling mdlSystem_userAbortEnable with an argument of 0.
The mdlSystem_extendedAbortRequested function allows an MDL application to determine if the user requested anytime since the last call to mdlSystem_extendedAbortEnable.
An MDL application should not keep the abort testing constantly enabled. It should enable it at the beginning of time-consuming task, and disable it at the end.
See also
mdlSystem_userAbortEnable mdlSystem_abortRequested
Remarks
Required Library: mdlbltin.lib
int mdlSystem_extendedAbortRequested ( )

mdlSystem_extendedAbortEnable and mdlSystem_extendedAbortRequested allow

an MDL application to check for a user abort using the same mechanism as MicroStation's update and fence processing.

This lets the user abort a process using Escape, Reset or <Ctrl-C>. The other methods of signaling abort limit the user to pressing <Ctrl-C> to abort the application.

Remarks
If enable is true, MicroStation turns on the extended abort processing. In doing so, it resets the MicroStation flag that indicates whether an abort has been requested. It also turns off the standard abort processing for that application by calling mdlSystem_userAbortEnable with an argument of 0.
If enable is false, MicroStation turns off extended abort processing. In doing so, it does not reset the MicroStation flag that indicates whether an abort has been requested. That value can still be tested using mdlSystem_extendedAbortRequested. MicroStation also enables standard abort processing for the application by calling mdlSystem_userAbortEnable with an argument of 0.
The mdlSystem_extendedAbortRequested function allows an MDL application to determine if the user requested anytime since the last call to mdlSystem_extendedAbortEnable.
An MDL application should not keep the abort testing constantly enabled. It should enable it at the beginning of time-consuming task, and disable it at the end.
Returns
A non-zero value if the user has requested an abort. 0 if the user has not requested an abort.
See also
mdlSystem_userAbortEnable mdlSystem_abortRequested
Remarks
Required Library: mdlbltin.lib
int mdlSystem_fileDesign ( )

The mdlSystem_fileDesign function produces the same result

as selecting Save Settings from the File menu.

All savable settings (those stored in the type 9 and 66 elements) are saved in the design file.

Returns
The mdlSystem_fileDesign function returns SUCCESS if no errors occur. Otherwise, it returns a non-zero value.
Remarks
Required Library: mdlbltin.lib
MdlDesc* mdlSystem_findMdlDesc ( WCharCP  nameP)

The mdlSystem_findMdlDesc function gets a pointer to the

MDL descriptor with given task ID.

Parameters
[in]namePdescriptor with the task ID
Remarks
An MDL descriptor is a structure that MicroStation uses to track the status of an MDL application. The format of the structure itself is not published. Wherever a pointer to an MDL descriptor is used, it is just declared as void. Typically, MDL programs do not need to be concerned with the MDL descriptor.
Usually the task ID is just the base name of the application's file name. In some cases, a specific task ID is specified via the MDL linker. The task ID is not case sensitive. Prior to using the task ID, MicroStation always makes a copy of it and converts it to upper case.
Both the task ID of an MDL application and the pointer to the MDL descriptor uniquely identify the MDL program. To derive the MDL descriptor from the task ID, use the built-in function mdlSystem_findMdlDesc. To derive the task ID from the MDL descriptor, use the built-in function mdlSystem_getMdlTaskID. A program can retrieve its own MDL descriptor using the built-in function mdlSystem_getCurrMdlDesc.
Returns
mdlSystem_findMdlDesc returns a pointer to an MDL descriptor. If the named task is not loaded, it returns NULL. mdlSystem_getCurrMdlDesc returns a pointer to an MDL descriptor. mdlSystem_getMdlTaskID returns a pointer to a task ID.
See also
mdlSystem_getMdlTaskList
Remarks
Required Library: mdlbltin.lib
void mdlSystem_freeFileThumbnail ( byte **  imagePP)

Free the memory occupied by the specified thumbnail image.

Parameters
[in]imagePPa pointer to the image pointer indicating the thumbnail image to be freed.
Remarks
Required Library: mdlbltin.lib
See also
mdlSystem_displayFileThumbnail
WCharCP mdlSystem_getApplicationPath ( WCharCP  taskIdP)

Returns a pointer to the full path of the MicroStation resource file that contains the MDL application.

Parameters
[in]taskIdPPoints to the task ID that identifies the application being queried. If taskIdP is NULL, mdlSystem_getApplicationPath returns the path of the currently executing MDL application.
Returns
The full path of the MicroStation resource file that contains the MDL application. If mdlSystem_getApplicationPath can not find the MDL descriptor for the specified task ID, it sets mdlErrno to MDLERR_NOSUCHAPPLICATION and returns NULL.
Remarks
Required Library: mdlbltin.lib
void mdlSystem_getBatchProcessingFile ( WCharP  fileName,
int  bufferLength 
)

This function is meant to be called during the Batch Processing "Analyze File" state.

During this state, Batch Process will open the file and determine the file type as well as the model list. This function allows apps that care about doing something prior to this pre-processing to know which file is about to be worked on. Other Microstation asyncs can be monitored to know which file is being processed during the other Batch Processing states, including SYSTEM_NEW_DESIGN_FILE and SYSTEM_DESIGN_FIND.

Parameters
[out]fileNameThis buffer receives the file that is currently being analyzed. This is not the script file or file list - rather the actual file that will be opened and processed. If Batch Process is inactive or not in the file analyze section, it will be filled with an empty string.
[in]bufferLengthThe maximum size of the fileName buffer.
Remarks
Required Library: mdlbltin.lib
int mdlSystem_getChar ( )

The mdlSystem_getChar function polls the keyboard looking for a character.

It returns immediately, regardless of whether a character is available.

Returns
The mdlSystem_getChar function returns 0 if a character is not available. Otherwise, it returns the character.
See also
userState_keyin mdlDialog_openAlert
Remarks
Required Library: mdlbltin.lib
MdlDesc* mdlSystem_getCurrMdlDesc ( )

The mdlSystem_getCurrMdlDesc gets a pointer to the MDL descriptor of

the currently active MDL application.

That is, it returns a pointer to the MDL descriptor of the application that makes the call to mdlSystem_getCurrMdlDesc.

Remarks
An MDL descriptor is a structure that MicroStation uses to track the status of an MDL application. The format of the structure itself is not published. Wherever a pointer to an MDL descriptor is used, it just declared as void. Typically, MDL programs do not need to be concerned with the MDL descriptor.
Usually the task ID is just the base name of the application's file name. In some cases, a specific task ID is specified via the MDL linker. The task ID is not case sensitive. Prior to using the task ID, MicroStation always makes a copy of it and converts it to upper case.
Both the task ID of an MDL application and the pointer to the MDL descriptor uniquely identify the MDL program. To derive the MDL descriptor from the task ID, use the built-in function mdlSystem_findMdlDesc. To derive the task ID from the MDL descriptor, use the built-in function mdlSystem_getMdlTaskID. A program can retrieve its own MDL descriptor using the built-in function mdlSystem_getCurrMdlDesc.
Returns
mdlSystem_getCurrMdlDesc returns a pointer to an MDL descriptor.
See also
mdlSystem_getMdlTaskList
Remarks
Required Library: mdlbltin.lib
WCharCP mdlSystem_getCurrTaskID ( )

The mdlSystem_getCurrTaskID function returns a pointer to the task ID of the

application that calls it.

Applications that require a task ID should use this function rather than relying on a hard-coded value.

Returns
The mdlSystem_getCurrTaskID function returns a pointer to the application's task ID.
Remarks
Required Library: mdlbltin.lib
int mdlSystem_getCursorPosition ( DPoint3dP  position,
int *  qualifierMaskP,
MSWindowP *  gwP,
int *  region,
DPoint3dP  dpUorsP 
)

Return information about the current position of the cursor.

Parameters
[out]positionposition of the pointer in input device space
[out]qualifierMaskPwhether CTRL, ALT or SHIFT keys are pressed
[out]gwPthe GUIWindow the pointer is currently in
[out]dpUorsPthe datapoint Uors, set by auxInput
[out]regionthe region the cursor is in
Returns
SUCCESS unless the pointer is not in the MicroStation GUI
Remarks
Required Library: mdlbltin.lib
int mdlSystem_getFreeDiskSpace ( Int64 pTotalBytes,
Int64 pFreeBytes,
WCharCP  fileSys 
)

Get the amount of available disk space from the specified system drive volume.

Parameters
[out]pTotalBytesis the total capacity of the given drive.
[out]pFreeBytesis the amount of available space on the given drive volume.
[in]fileSysis a valid drive letter for the current system.
Returns
SUCCESS if the information was found, otherwise ERROR.
Remarks
Required Library: mdlbltin.lib
IGlobalPositionSourceP mdlSystem_getGlobalPositionSource ( )

Retrieves the C++ object that implements the IGlobalPositionSource interface.

Remarks
The caller must check to see whether the returned pointer is NULL. If so, MicroStation's GPS device interface is not loaded.
IGlobalPositionSource is an interface that has methods to query for the presence of a properly configured and communicating GPS device, and to get position data from it if it is working.
Returns
The C++ object implementing the IGlobalPositionSource interface.
Remarks
Required Library: mdlbltin.lib
See also
IGlobalPosition.h
MdlApplicationClass mdlSystem_getMdlAppClass ( MdlDescP  mdlDesc)

Retrieves the application class of the specified MDL application.

Parameters
[in]mdlDescpoints to an MDL descriptor; pass NULL to get the application class of the current MDL descriptor.
Returns
The class type (such as MdlApplicationClass::User) for the currently executing MDL application.
Remarks
Required Library: mdlbltin.lib
void mdlSystem_getMdlAppVersionNumber ( MdlDesc mdlDescP,
VersionNumber pVersionNumber 
)

Retrieves an MDL application's version number.

This is the version number that MicroStation displays in the MDL application detail dialog.

Parameters
[in]mdlDescPpoints to an MDL descriptor. An application can pass NULL to get its own version number.
[in]pVersionNumberpoints to a structure to receive the version number.
Remarks
Required Library: mdlbltin.lib
MdlDesc* mdlSystem_getMdlDescFromProcessNumber ( long  processNumber)

Return the process number of the specified MDL task.

The mdlSystem_getMdlDescFromProcessNumber function returns a pointer to the MDL descriptor corresponding to the specified process number.

Parameters
[in]processNumberis a number that uniquely identifies an MDL task.
Remarks
MicroStation assigns a number to the MDL task when it loads the application. MicroStation does not reuse any process numbers during a MicroStation session. Even after an application is unloaded, that application's process number will not refer to another MDL application.
MicroStation uses the process number as a task identifier in places where it is absolutely essential that the identifer cannot refer to another task. In such cases, MicroStation cannot use the task ID or MDL descriptor because either of these may be reused after the application is unloaded.
MicroStation stores the process number with UNDO information to identify the MDL task that caused the transaction. This process number is part of the UNDO information that is passed to mdlUndo_addToBuffer and mdlUndo_command user functions.
Returns
mdlSystem_getProcessNumberFromMdlDesc returns the process number that uniquely identifies the MDL task. If the corresponding MDL application is still loaded, mdlSystem_getMdlDescFromProcessNumber returns a pointer to the task's MDL descriptor. Otherwise, it returns NULL.
See also
mdlSystem_getCurrMdlDesc hmdlSystem_getMdlTaskID mdlSystem_findMdlDesc userUndo_addToBuffer userUndo_command
Remarks
Required Library: mdlbltin.lib
WCharCP mdlSystem_getMdlTaskID ( MdlDesc mdlDescP)

The mdlSystem_getMdlTaskID function gets a pointer to the task ID of the

application identified by mdlDescP.

Parameters
[in]mdlDescPtask whose taskID is wanted
Remarks
An MDL descriptor is a structure that MicroStation uses to track the status of an MDL application. The format of the structure itself is not published. Wherever a pointer to an MDL descriptor is used, it just declared as void. Typically, MDL programs do not need to be concerned with the MDL descriptor.
Usually the task ID is just the base name of the application's file name. In some cases, a specific task ID is specified via the MDL linker. The task ID is not case sensitive. Prior to using the task ID, MicroStation always makes a copy of it and converts it to upper case.
Both the task ID of an MDL application and the pointer to the MDL descriptor uniquely identify the MDL program. To derive the MDL descriptor from the task ID, use the built-in function mdlSystem_findMdlDesc. To derive the task ID from the MDL descriptor, use the built-in function mdlSystem_getMdlTaskID. A program can retrieve its own MDL descriptor using the built-in function mdlSystem_getCurrMdlDesc.
Returns
mdlSystem_getMdlTaskID returns a pointer to a task ID.
See also
mdlSystem_getMdlTaskList
Remarks
Required Library: mdlbltin.lib
void mdlSystem_getMdlTaskList ( bvector< WString > &  taskList)

The mdlSystem_getMdlTaskList function generates a list of installed MDL task

names.

Returns
mdlSystem_getMdlTaskList fills a bvector with the list of names.
See also
mdlSystem_getMdlTaskID
Remarks
Required Library: mdlbltin.lib
long mdlSystem_getProcessNumberFromMdlDesc ( MdlDesc mdlDesc)

Return the process number of the specified MDL task.

The mdlSystem_getMdlDescFromProcessNumber function returns a pointer to the MDL descriptor corresponding to the specified process number.

Parameters
[in]mdlDescis a pointer to an MDL descriptor.
Remarks
MicroStation assigns a number to the MDL task when it loads the application. MicroStation does not reuse any process numbers during a MicroStation session. Even after an application is unloaded, that application's process number will not refer to another MDL application.
MicroStation uses the process number as a task identifier in places where it is absolutely essential that the identifer cannot refer to another task. In such cases, MicroStation cannot use the task ID or MDL descriptor because either of these may be reused after the application is unloaded.
MicroStation stores the process number with UNDO information to identify the MDL task that caused the transaction. This process number is part of the UNDO information that is passed to mdlUndo_addToBuffer and mdlUndo_command user functions.
Returns
mdlSystem_getProcessNumberFromMdlDesc returns the process number that uniquely identifies the MDL task. If the corresponding MDL application is still loaded, mdlSystem_getMdlDescFromProcessNumber returns a pointer to the task's MDL descriptor. Otherwise, it returns NULL.
See also
mdlSystem_getCurrMdlDesc mdlSystem_getMdlTaskID mdlSystem_findMdlDescC userUndo_addToBuffer userUndo_command
Remarks
Required Library: mdlbltin.lib
int mdlSystem_getTaskStatistics ( MdlAppStatistics statisticsP,
WCharCP  taskIdP 
)

The mdlSystem_getTaskStatistics function collects statistics on the task specified

by taskIdP.

It returns them in the structure that statisticsP points to. taskIdP points to the task ID of the desired MDL task.

Parameters
[out]statisticsPcan be NULL if mdlSystem_getTaskStatistics is used only to determine whether a program is installed.
[in]taskIdPNULL for current task
Returns
The mdlSystem_getTaskStatistics function returns SUCCESS if the task is still installed. Otherwise, it returns a non-zero value.
Remarks
Required Library: mdlbltin.lib
MSTNTOOLS_EXPORT unsigned long mdlSystem_getTicks ( )

Gets a tick count from an arbitrary start time.

Each tick is approximately 1/60 of a second.

Remarks
Useful only for comparing values returned from mdlSystem_getTicks()
Required Library: mdlbltin.lib
void mdlSystem_ignoreNextEraseBkGnd ( )

Ignores the next WM_ERASEBKGND Windows message for a child window.

Should only be used when an MDL dialog is hosting a WinForms control.

Remarks
Required Library: mdlbltin.lib
UInt32 mdlSystem_incrementLockCount ( MdlDesc mdlDesc)

Increments a lock count.

If the MDL application's lock count is greater than zero, MicroStation will not unload it unless MicroStation is shutting down

Parameters
[in]mdlDescpoints to an MDL descriptor; cannot be NULL
Remarks
Required Library: mdlbltin.lib
Returns
The value of the application's lock count after incrementing.
bool mdlSystem_isDropShadowSupported ( )

Detects whether drop-shadows are supported by the OS.

Returns
true if drop-shadows are supported.
Remarks
Required Library: mdlbltin.lib
bool mdlSystem_isGraphicsInitialized ( )

Check if graphics have been initialized.

Returns
If graphics have been initialized, mdlSystem_isGraphicsInitialized returns 1, else 0.
Remarks
Programs that support operation in non-graphics sessions must use this function and avoid attempts to interact with the user through GUI until or unless this function returns true.
Required Library: mdlbltin.lib
bool mdlSystem_isRunningInRemoteSession ( )

Detects whether the product is running in a Remote Desktop Services client session.

Returns
true if running in a Remote Desktop Services client session.
Remarks
Required Library: mdlbltin.lib
bool mdlSystem_isRunningVistaorLater ( )

Checks if the operating system is Windows Vista or later.

Returns
true is the operating system is Windows Vista or later
Remarks
Required Library: mdlbltin.lib
bool mdlSystem_isRunningWin10orLater ( )

Checks if the operating system is Windows 10 or later.

Returns
true is the operating system is Windows 10 or later
Remarks
Required Library: mdlbltin.lib
bool mdlSystem_isRunningWin7orLater ( )

Checks if the operating system is Windows 7 or later.

Returns
true is the operating system is Windows 7 or later
Remarks
Required Library: mdlbltin.lib
bool mdlSystem_isRunningWin8orLater ( )

Checks if the operating system is Windows 8 or later.

Returns
true is the operating system is Windows 8 or later
Remarks
Required Library: mdlbltin.lib
bool mdlSystem_isRunningWinXPorLater ( )

Checks if the operating system is Windows XP or later.

Returns
true is the operating system is Windows XP or later
Remarks
Required Library: mdlbltin.lib
int mdlSystem_loadMdlProgram ( WCharCP  pathP,
WCharCP  taskIdP,
WCharCP  pArgument 
)

Load the program specified by taskIdP from the resource file specified by appFileP.

If appFileP is NULL, the new program is loaded from the same resource file as the parent task. If the task has a function main, main is executed before the calling function is resumed. argumentP is passed to main.

Parameters
[in]pathPFile containing the program. It is common to only specify the main part of the file name. mdlSystem_loadMdlProgram appends the .ma and finds the file in one of the locations that the MS_MDL environment variable specifies. Do not specify NULL unless the program to be loaded and the program making the call are loaded from the same resource file.
[in]taskIdPSpecifies which program is to be loaded. NULL is normally used for this parameter. It is only necessary to specify the task ID if the file contains more than one MDL application.
[in]pArgumentArgument passed to MDL Program's main.
Remarks
If the program is already loaded and does not have a reload user function, an error occurs. If the program is already loaded and has a reload user function, MicroStation calls that reload user function.
Most calls to this function are similar to mdlSystem_loadMdlProgram ("TheTask", "THETASK", NULL). Do not use the form mdlSystem_loadMdlProgram (NULL, "THETASK", NULL) unless the MDL application making the call and the MDL application being loaded are in the same resource file.
Returns
The mdlSystem_loadMdlProgram function returns SUCCESS if it is successful. Otherwise, it returns -1.
Remarks
The values for mdlErrno are defined in mdlerrs.r.h.
See also
userSystem_mdlChildTerminated userSystem_unloadProgram userSystem_reloadProgram
Remarks
Required Library: mdlbltin.lib
int mdlSystem_newDesignFile ( WCharCP  fileName)

Open a Design File after closing the open (active) design file.

Parameters
[in]fileNamespecifies the name of the file. The filename path or extension does not need to be supplied. MicroStation assumes the .dgn extension. It searches all directories specified by the MicroStation environment variable MS_DEF.
Remarks
The mdlSystem_newDesignFile function reinitializes most of MicroStation. For example, it clears the state functions, reads the type 9 and 66 elements and initializes the Terminal Control Block (TCB) accordingly, and resets all undo pointers.
If the mdlSystem_newDesignFile function is unable to initialize the TCB, it displays a message and exits MicroStation.
If the end-of-file is missing, the mdlSystem_newDesignFile function asks the user if the file should be fixed. It attempts to fix the file upon user request.
The mdlSystem_newDesignFile function places queue elements in the input queue and invokes MicroStation's queue processing loop. This action could affect a task that has command or queue filters (such as those set using InputCallback::SetMonitorFunction) or that is queuing elements before calling mdlSystem_newDesignFile.
Returns
The mdlSystem_newDesignFile returns SUCCESS if no errors occur.
Remarks
Required Library: mdlbltin.lib
int mdlSystem_newDesignFileAndModel ( WCharCP  fileName,
WCharCP  modelName 
)

Open the specified model in the specified design file after closing the open (active) design file.

Parameters
[in]fileNamespecifies the name of the file. The filename path or extension does not need to be supplied. MicroStation assumes the .dgn extension. It searches all directories specified by the MicroStation environment variable MS_DEF.
[in]modelNamespecifies the model within the file. If this modelName is NULL, the model that was active during the most recent "save settings" operation is opened.
Remarks
The mdlSystem_newDesignFileAndModel function reinitializes most of MicroStation. For example, it clears the state functions, reads the type 9 and 66 elements and initializes the Terminal Control Block (TCB) accordingly, and resets all undo pointers.
If the mdlSystem_newDesignFileAndModel function is unable to initialize the TCB, it displays a message and exits MicroStation.
The mdlSystem_newDesignFileAndModel function places queue elements in the input queue and invokes MicroStation's queue processing loop. This action could affect a task that has command or queue filters (such as those set using InputCallback::SetMonitorFunction) or that is queuing elements before calling mdlSystem_newDesignFile.
Returns
The mdlSystem_newDesignFile returns SUCCESS if no errors occur.
Remarks
Required Library: mdlbltin.lib
MdlDesc* mdlSystem_nextMdlApp ( MdlDesc descP)

Allow an MDL program to step through MicroStation's list of MDL tasks.

Parameters
[in]descPpoints to an MDL descriptor. It typically is NULL, or the value returned from the previous call to mdlSystem_nextMdlApp.
Remarks
To step through MicroStation's list of MDL tasks, first call mdlSystem_nextMdlApp passing NULL for descP. Next call mdlSystem_nextMdlApp specifying the MDL descriptor returned from the previous call to mdlSystem_nextMdlApp. Continue this until mdlSystem_nextMdlApp returns NULL.
Returns
mdlSystem_nextMdlApp returns a pointer to an MDL descriptor if descP is NULL, or points to the MDL descriptor that is next in the list. If descP points to the last entry in the list, mdlSystem_nextMdlApp returns NULL.
See also
mdlSystem_findMdlDesc
Remarks
Required Library: mdlbltin.lib
bool mdlSystem_openFileThumbnail ( DgnPlatform::DgnFileFormatType *  pFormat,
int *  pMajorVersion,
int *  pMinorVersion,
bool *  pDefaultModelIs3D,
WCharCP  fileName,
byte **  image,
int *  imageSize 
)

Open the thumbnail image for the specified file.

Parameters
[out]pFormata pointer to an integer indicating the format of the file. This value will be DgnFileFormatType::V8, DgnFileFormatType::V7, DgnFileFormatType::DWG or DgnFileFormatType::DXF.
[out]pMajorVersiona pointer to an integer indicating the major version of the software that wrote the file.
[out]pMinorVersiona pointer to an integer indicating the minor version of the software that wrote the file.
[out]pDefaultModelIs3Dindicates whether the default model in the file is three dimensional.
[in]fileNamethe name of the file to validate and open the thumbnail for.
[in,out]imagea pointer to the buffer to receive the image data
[in]imageSizea pointer to an integer indicating the size of the imagePP buffer.
Returns
true if the file is a valid design file, otherwise false.
Remarks
Required Library: mdlbltin.lib
void mdlSystem_pauseTicks ( int  sixtieths)

Pause the MDL program and MicroStation for at least the specified interval.

MicroStation pauses in an idle loop. It is inactive during the interval.

Parameters
[in]sixtiethspause intervals; sixtieths of a second
Remarks
The ticks are approximately, but not exactly, one-sixtieth of a second. On some platforms a time resolution this fine is not available. MicroStation attempts to be as close as possible to sixtieths.
See also
mdlSystem_setTimerFunction
Remarks
Required Library: mdlbltin.lib
void mdlSystem_pumpMessages ( )

Enters a message pumping loop to be used during long processes, indicating

to the OS that the application is still responsive.

Remarks
Required Library: mdlbltin.lib
void mdlSystem_pumpMessagesEx ( unsigned long  minTicks)

Identical to mdlSystem_pumpMessages except that the message pumping loop 

is only executed if at least minTicks ticks have elapsed since the last message pump

Parameters
[in]minTicksPump messages only if this many ticks have elapsed since last pump
Remarks
Required Library: mdlbltin.lib
See also
mdlSystem_pumpMessages mdlSystem_getTicks
int mdlSystem_registerCommandNames ( MdlCommandName pNamess)

Register functions with the mdl runtime engine.

Parameters
[in]pNamessis an array of MdlCommandName that are to be registered.
Returns
SUCCESS if the names and function pointers are valid.
See also
mdlSystem_registerCommandNamesByDesc
Remarks
Required Library: mdlbltin.lib
int mdlSystem_registerCommandNamesByDesc ( struct mdlDesc *  pDesc,
MdlCommandName pNames 
)

Register functions with the mdl runtime engine.

Parameters
[in]pDescis an MDL descriptor. This is a descriptor that MDL uses to keep track of MDL applications. Use mdlSystem_getCurrMdlDesc to find the MDL descriptor for the current task.
[in]pNamesis the array of MdlCommandNames to register with the runtime engine.
Returns
SUCCESS unless there is insufficient memory, then ERROR.
See also
mdlSystem_registerCommandNames
Remarks
Required Library: mdlbltin.lib
int mdlSystem_registerCommandNumbers ( MdlCommandNumber pNumbers)

Register functions with the mdl runtime engine.

Parameters
[in]pNumbersis an array of MdlCommandNumbers that are to be registered.
Returns
SUCCESS if the numbers and function pointers are valid.
See also
mdlSystem_registerCommandNumbersByDesc
int mdlSystem_registerCommandNumbersByDesc ( struct mdlDesc *  pDesc,
MdlCommandNumber pNumbers 
)

Register functions with the mdl runtime engine.

Parameters
[in]pDescis an MDL descriptor. This is a descriptor that MDL uses to keep track of MDL applications. Use mdlSystem_getCurrMdlDesc to find the MDL descriptor for the current task.
[in]pNumbersis the array of MdlCommandNumbers to register.
Returns
SUCCESS unless there is insufficient memory, then ERROR.
See also
mdlSystem_registerCommandNumbers
Remarks
Required Library: mdlbltin.lib
int mdlSystem_saveDesignFile ( )

Save all pending changes to the active design file.

It simulates the user selecting "Save" from the "File" menu.

Returns
mdlSystem_saveDesignFile returns ERROR if there is no active file or if that file is readonly. Otherwise, SUCCESS is returned.
See also
mdlSystem_fileDesign mdlSystem_closeDesignFile
Remarks
Required Library: mdlbltin.lib
StatusInt mdlSystem_saveDesignFileAs ( WCharCP  pFileName,
DgnFileP  dgnFileObj,
DgnPlatform::DgnFileFormatType  format,
bool  convertRefs 
)

Save a file file object to a different file or a different format.

It is roughly equivalent to the user doing a Save As...

Returns
SUCCESS if the file was saved successfully and an appropriate error code otherwise.
Parameters
[in]pFileNamethe name of the file to save to.
[in]dgnFileObjthe file object to save.
[in]formatthe format to save to. The formats are defined in msdgnfileobj.h. The currently supported formats include DgnFileFormatType::V7, DgnFileFormatType::V8, DgnFileFormatType::DWG and DgnFileFormatType::DXF.
[in]convertRefsif true and references are created (if they do not already exist in the target format.
Remarks
Required Library: mdlbltin.lib
void mdlSystem_scheduleUnload ( MdlDesc mdlDescriptor,
bool  silent,
int  unloadStatus 
)

Immediately disconnects nearly all hook functions for the current MDL application

so the application will not be called again, and queues an CMD_MDL_UNLOAD command so the application will be unloaded as soon as possible.

Parameters
[in]unloadStatusis the function's exit status. If the MDL task was started by another MDL task, the exit status is returned to the parent task.
[in]mdlDescriptorspecifies the app to be unloaded. If this argument is NULL mdSystem_scheduleUnload uses the MdlDesc of the current MDL application.
[in]silentdetermines whether MicroStation displays a message indicating that the MDL application was unloaded.
Remarks
This replaces mdlSystem_exit. However, unlike mdlSystem_exit, mdlSystem_scheduleUnload does return the caller. MicroStation no longer offers a way to unwind the call stack.
mdlSystem_scheduleUnload does not disconnect the SystemFunc_UnloadProgram hook function so if the MDL application did set up a SystemFunc_UnloadProgram hook function MicroStation will call it when unloading the application.
Required Library: mdlbltin.lib
void mdlSystem_setApplicationTitle ( WCharCP  fileName)

Set the title string in the main application window title bar.

Parameters
[in]fileNameis usually the name of the current design file. Remarks The system appends the name of the running software product following the file name string passed to this function.
Remarks
Required Library: mdlbltin.lib
MdlApplicationClass mdlSystem_setMdlAppClass ( WCharCP  taskIdP,
MdlApplicationClass  newClass 
)

Modify the application class of a loaded MDL application.

Parameters
[in]taskIdPspecifies the application to be effected. If an application is modifying its own application class, it can specify NULL for taskIdP.
[in]newClassspecifies the new class. It must be one of the APPLICATION_ values defined in msdefs.h. Application programs normally have class MdlApplicationClass::InitApp if the application was started from the MS_INITAPPS environment variable, MdlApplicationClass::DGNApp if the application was started from the MS_DGNAPPS environment variable, or MdlApplicationClass::User if it was started any other way. Some MS_INITAPPS applications that start other MDL applications need the child application to remain loaded. They want to prevent the application from being unloaded if MicroStation exits from the design file state. To prevent this, set the child application's class to MdlApplicationClass::InitApp after starting it.
Returns
mdlSystem_setMdlAppClass returns -1 if the application is not loaded. Otherwise, it returns the application's old class.
Remarks
Required Library: mdlbltin.lib
void mdlSystem_setMdlAppVersionNumber ( MdlDesc mdlDescP,
VersionNumber pVersionNumber 
)

Sets an MDL application's version number.

This is the version number that MicroStation displays in the MDL application detail dialog.

Parameters
[in]mdlDescPpoints to an MDL descriptor. An application can pass NULL to set its own version number.
[in]pVersionNumberpoints to a structure that contains the version number.
Remarks
An MDL application coded in MDL does not need this function because the system uses the version encoded in the application. A native code MDL application coded in C/C++ can use this function to sets its version number.
Required Library: mdlbltin.lib
int mdlSystem_setTimerFunction ( int *  timerHandleP,
long  duration,
MdlTimerFuncP  funcP,
intptr_t  argument,
int  continuous 
)

Designate a timer function to be called after duration timer ticks.

A tick is approximately (but not exactly) one-sixtieth of a second. The output timerHandleP is set to a unique integer handle that cancels the timer using mdlSystem_cancelTimer. When the user-designated function function is called, the long-sized argument userArg is passed to it. If continuous is true, function is called every duration ticks until cancelled.

Parameters
[out]timerHandlePtimer handle
[in]durationduration in sixtieths of a second
[in]funcPoffset of function to call on timeout
[in]argumentargument to send to your function
[in]continuousif true, restart on timeout
Remarks
An MDL application can have multiple timers simultaneously. When an MDL application exits, all of its timers are automatically canceled.
Returns
The mdlSystem_setTimerFunction function returns SUCCESS if it is successful. It returns ERROR if duration is less than zero or system resources are exhausted. mdlSystem_cancelTimer is of type void. It returns no value.
See also
userSystem_timerExpired mdlSystem_getTicks
Remarks
Required Library: mdlbltin.lib
void mdlSystem_startBusyCursor ( )

Change the graphical cursor to a form which indicates to the user that work is in progress and that the user should

wait for the operation to complete

See also
mdlSystem_stopBusyCursor
Remarks
Required Library: mdlbltin.lib
bool mdlSystem_startedAsAutomationServer ( )

Determine whether MicroStation was started as an Automation Server.

Returns
true if the application was started as an Automation server, else false.
See also
mdlSystem_registerCommandNames
Remarks
Required Library: mdlbltin.lib
void mdlSystem_stopBusyCursor ( )

Change the cursor back to normal following a call to mdlSystem_startBusyCursor.

See also
mdlSystem_startBusyCursor
int mdlSystem_unloadMdlProgram ( WCharCP  pName)

Unload the MDL program specified by taskIdP.

The MDL task to be unloaded can reject the unload request by returning a non-zero value from the mdlSystem_unloadProgram user function.

Parameters
[in]pNameName of the program to unload
Returns
The mdlSystem_unloadMdlProgram function returns zero if it is successful. Otherwise, it returns a non-zero value and more detailed error information is available in mdlErrno.
Remarks
The values for mdlErrno are defined in mdlerrs.r.h.
See also
userSystem_mdlChildTerminated userSystem_unloadProgram userSystem_reloadProgram
Remarks
Required Library: mdlbltin.lib
int mdlSystem_updateCurrentNode ( )

Updates the current text node number and saves the new value to the design file.

Returns
The next text node number to be used.
Remarks
After mdlSystem_updateCurrentNode returns, the value in tcb->canode is the same as the value returned. A program should not use tcb->canode unless it first calls mdlSystem_updateCurrentNode.
Required Library: mdlbltin.lib
UInt32 mdlSystem_updateGraphicGroup ( )

Updates the current graphic group number.

Returns
A graphic group number that can be assigned to an element.
Remarks
After mdlSystem_updateGraphicGroup returns, the value in tcb->graphic is one greater than the value returned. A program should not use tcb->graphic unless it calls mdlSystem_updateGraphicGroup afterwards.
Required Library: mdlbltin.lib
StatusInt mdlSystem_upgradeDesignFile ( WCharCP  designFileName)

Upgrade a DGN file from a previous version to the current version.

Parameters
[in]designFileNamename of file to upgrade.
Returns
SUCCESS if the file was succesfully upgraded or if the file is already in the current version. Otherwise, an error status is returned.
Remarks
Required Library: mdlbltin.lib
int mdlSystem_userAbortEnable ( int  enable)

Control whether the user can abort an MDL task.

If an MDL task never calls mdlSystem_userAbortEnable, the user can abort the MDL task by pressing <Ctrl-C>. The MDL task can disable this capability by calling mdlSystem_userAbortEnable with an argument of 0. The MDL task can enable this capability by calling mdlSystem_userAbortEnable with a non-zero argument. By default, this capability is enabled.

Remarks
An MDL task can call mdlSystem_abortRequested to determine whether the user has tried to abort the task. mdlSystem_abortRequested works even if the task disables the abort capability. It does not actually abort the task. It simply allows the task to determine whether an abort has been requested.
Parameters
[in]enable0 prevents asynchronous aborts
Returns
whether the user abort flag was enabled before this call.
See also
mdlSystem_extendedAbortEnable mdlSystem_extendedAbortRequested
Remarks
Required Library: mdlbltin.lib
StatusInt mdlWindow_getDefaultCaptionFont ( WStringR  fontName,
int &  fontHeight,
int &  fontWeight,
bool &  fontFixed 
)

Gets the default caption font taking the locale into account.

Parameters
[out]fontNamethe font name/type face of the font
[out]fontHeightthe height, in logical units, of the font's character cell or character
[out]fontWeightthe weight of the font in the range from 0 through 1000
[out]fontFixedtrue if the font is fixed-pitch, or false if it is variable-pitch
Remarks
Required Library: mdlbltin.lib
StatusInt mdlWindow_getDefaultDialogFont ( WStringR  fontName,
int &  fontHeight,
int &  fontWeight,
bool &  fontFixed 
)

Gets the default dialog font taking the locale into account.

Parameters
[out]fontNamethe font name/type face of the font
[out]fontHeightthe height, in logical units, of the font's character cell or character
[out]fontWeightthe weight of the font in the range from 0 through 1000
[out]fontFixedtrue if the font is fixed-pitch, or false if it is variable-pitch
Remarks
Required Library: mdlbltin.lib
static SystemFunc_AcsOperation SetAcsOperationFunction ( SystemFunc_AcsOperation  newFunc)
static

Set a function that is called when an ACS is created, deleted, or modified.

Parameters
[in]newFuncThe new function to call.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
Remarks
Applications should register a DgnPlatform::IACSEvents listener instead.
See also
SystemFunc_AcsOperation, DgnPlatform::ACSManager::AddListener, DgnPlatform::ACSManager::DropListener
static SystemFunc_ActiveElementTemplateChanged SetActiveElementTemplateChangedFunction ( SystemFunc_ActiveElementTemplateChanged  newFunc)
static

Allows you to be notified after the active Element Template is changed.

See also
SystemFunc_ActiveElementTemplateChanged
static SystemFunc_ActiveParamChanged SetActiveParamChangedFunction ( SystemFunc_ActiveParamChanged  newFunc)
static

Set a function that is called when the state of an active parameter changes.

Parameters
[in]newFuncThe new function to call.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
See also
SSystemFunc_ActiveParamChanged
static SystemFunc_AllMdlUnloads SetAllMdlUnloadsFunction ( SystemFunc_AllMdlUnloads  unloadFunction)
static

An MDL application can use this to set a function to be called whenever any MDL application unloads.

Parameters
[in]unloadFunctionThe new function to call, or NULL.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
Remarks
Most MDL applications will use SetUnloadProgramFunction instead of this function.
See also
SystemFunc_AllMdlUnloads, SetMdlChildTerminatedFunction, SetUnloadProgramFunction
static SystemFunc_ApplicationAreaChange SetApplicationAreaChangeFunction ( SystemFunc_ApplicationAreaChange  newFunc)
static

Set a function that is called when the Application Area has changed.

Parameters
[in]newFuncThe new function to call.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
See also
SystemFunc_ApplicationAreaChange
static SystemFunc_CellLibraryChange SetCellLibraryChangeFunction ( SystemFunc_CellLibraryChange  newFunc)
static

Set a function that is called whenever a cell library is attached or detached.

Parameters
[in]newFuncThe new function to call.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
See also
uSystemFunc_CellLibraryChangeC
static SystemFunc_ClipboardUpdated SetClipboardUpdatedFunction ( SystemFunc_ClipboardUpdated  newFunc)
static

Allows you to be notified when the Clipboard has been updated.

See also
SystemFunc_ActiveElementTemplateChanged
static SystemFunc_CmdWindowOpen SetCmdWindowOpenFunction ( SystemFunc_CmdWindowOpen  newFunc)
static

Set a function that is called when the Status Bar or Command Window has been opened.

Parameters
[in]newFuncThe new function to call.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
See also
SystemFunc_CmdWindowOpen
static SystemFunc_ColorMapChange SetColorMapChangeFunction ( SystemFunc_ColorMapChange  newFunc)
static

Set a function that is called when a color table is attached or modified.

Parameters
[in]newFuncThe new function to call.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
See also
SystemFunc_ColorMapChange
static SystemFunc_CreateLibraryCell SetCreateLibraryCellFunction ( SystemFunc_CreateLibraryCell  newFunc)
static

Set a function that is called whenever someone creates a cell in a cell library using the old method of placing a fence and orign and creating a cell.

It is not particularly useful because it will not be called when a cell library is opened as a DGN file and a new cell model is created.

Parameters
[in]newFuncThe new function to call.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
See also
uSystemFunc_CreateLibraryCellC
static SystemFunc_DgnLibsChanged SetDgnLibsChangedFunction ( SystemFunc_DgnLibsChanged  newFunc)
static

Allows you to be notified when the set of DgnLibs has changed.

See also
SystemFunc_DgnLibsChanged
static SystemFunc_DialogFind SetDialogFindFunction ( SystemFunc_DialogFind  newFunc)
static

Set a function that is called during a mdlDialog_findByTypeAndId call.

If the application wants to provide a different dialog, it should be returned; else return NULL.

Parameters
[in]newFuncThe new function to call.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
See also
SystemFunc_ApplicationAreaChange
static SystemFunc_DimStyleChange SetDimStyleChangeFunction ( SystemFunc_DimStyleChange  newFunc)
static

Set a function that is called each time a dimension style is added, deleted, or updated in a file.

Also called when the active dimension style changes.

Parameters
[in]newFuncThe new function to call.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
Remarks
This method is superceded by DimensionStyle::AddListener which provides more detailed information.
See also
uSystemFunc_DimStyleChangeC
static SystemFunc_ElmDscrCopy SetElmDscrCopyFunction ( SystemFunc_ElmDscrCopy  newFunc)
static

Set a function that is called when an element is being copied between models.

Parameters
[in]newFuncThe new function to call.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
See also
SystemFunc_ElmDscrCopy
static SystemFunc_ElmDscrToFile SetElmDscrToFileFunction ( SystemFunc_ElmDscrToFile  newFunc)
static

Set a function that is called before an element descriptor is written to a model to allow applications to modify the element or block the operation.

Parameters
[in]newFuncThe new function to call.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
Remarks
To monitor changes to specific elements consider adding ElementRefAppData instead.
See also
SystemFunc_ElmDscrToFile, DgnPlatform::ElementRefAppData
static SystemFunc_FenceChanged SetFenceChangedFunction ( SystemFunc_FenceChanged  newFunc)
static

Set a function that is called when a fence is defined or cleared.

Parameters
[in]newFuncThe new function to call.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
See also
SystemFunc_FenceChanged
static SystemFunc_LockChanged SetLockChangedFunction ( SystemFunc_LockChanged  newFunc)
static

Set a function that is called when the state of an active lock changes.

Parameters
[in]newFuncThe new function to call.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
See also
SSystemFunc_LockChanged
static SystemFunc_MainToolBoxTaskChanged SetMainToolBoxTaskChangedFunction ( SystemFunc_MainToolBoxTaskChanged  newFunc)
static

Allows you to be notified after the current UI "main" task (e.g.

via task navigation) has changed.

See also
SystemFunc_MainToolBoxTaskChanged
static SystemFunc_MdlChildTerminated SetMdlChildTerminatedFunction ( SystemFunc_MdlChildTerminated  unloadFunction)
static

An MDL application can use this to set a function to be called when the a child MDL application is unloaded.

Parameters
[in]unloadFunctionThe new function to call, or NULL.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
Remarks
MDL application CHILD is considered a child of MDL application PARENT if the MDL application PARENT started CHILD by calling mdlSystem_loadMdlProgramExtended or mdlSystem_loadMdlProgram.
See also
SystemFunc_MdlChildTerminated
static SystemFunc_MenuBarChange SetMenuBarChangeFunction ( SystemFunc_MenuBarChange  newFunc)
static

Set a function that is called when the main menu bar is changed via a call to mdlDialog_menuBarActivate.

Parameters
[in]newFuncThe new function to call.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
See also
SystemFunc_MenuBarChange
static SystemFunc_MessageCenterWrite SetMessageCenterWriteFunction ( SystemFunc_MessageCenterWrite  newFunc)
static

Set a function that is called when a message is written to the Message Center.

Parameters
[in]newFuncThe new function to call.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
See also
SystemFunc_MessageCenterWrite
static SystemFunc_MultilineStyleChanged SetMultilineStyleChangedFunction ( SystemFunc_MultilineStyleChanged  newFunc)
static

Set a function that is called each time a multi-line style is added, deleted, or updated in a file.

Also called when the active multi-line style changes.

Parameters
[in]newFuncThe new function to call.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
Remarks
This method is superceded by MultilineStyleStyle::AddListener which provides more detailed information.
See also
uSystemFunc_MultilineStyleChangedC
static SystemFunc_PromptOutput SetPromptOutputFunction ( SystemFunc_PromptOutput  newFunc)
static

Set a function that is called when a prompt is output to the Status Bar.

Parameters
[in]newFuncThe new function to call.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
See also
SystemFunc_PromptOutput
static SystemFunc_ReloadProgram SetReloadProgramFunction ( SystemFunc_ReloadProgram  newFunc)
static

An MDL application can use this to set a function to be called when there is another request to load it.

Parameters
[in]newFuncThe new function to call, or NULL.
Returns
The return value is the previous function that was set for this MdlApp, or NULL. Remarks Many MDL applications supply a reload function that reopens their user interface if it is not already open.
See also
SystemFunc_UnloadProgram
static SystemFunc_RibbonBackstageOpened SetRibbonBackstageOpenedFunction ( SystemFunc_RibbonBackstageOpened  newFunc)
static

Allows you to be notified when the Ribbon's Backstage is opened.

See also
SystemFunc_RibbonBackstageOpened
static SystemFunc_StatusOutput SetStatusOutputFunction ( SystemFunc_StatusOutput  newFunc)
static

Set a function that is called when a status message is output to the Status Bar.

Parameters
[in]newFuncThe new function to call.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
See also
SystemFunc_StatusOutput
static SystemFunc_SymbologyChanged SetSymbologyChangedFunction ( SystemFunc_SymbologyChanged  newFunc)
static

Set a function that is called whenever the active symbology (color, style, weight) is changed.

Parameters
[in]newFuncThe new function to call.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
See also
uSystemFunc_SymbologyChangedC
static SystemFunc_TaskNavigationTaskChanged SetTaskNavigationTaskChangedFunction ( SystemFunc_TaskNavigationTaskChanged  newFunc)
static

Allows you to be notified after the current UI task (e.g.

via task navigation) has changed.

See also
SystemFunc_TaskNavigationTaskChanged
static SystemFunc_TaskNavigationTaskChanging SetTaskNavigationTaskChangingFunction ( SystemFunc_TaskNavigationTaskChanging  newFunc)
static

Allows you to be notified before the current UI task is changed.

This allows you to cancel the task change, leaving the current task active.

See also
SystemFunc_TaskNavigationTaskChanging
static SystemFunc_TextStyleChange SetTextStyleChangeFunction ( SystemFunc_TextStyleChange  newFunc)
static

Set a function that is called each time a text style is added, deleted, or updated in a file.

Also called when the active text style changes.

Parameters
[in]newFuncThe new function to call.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
Remarks
This method is superceded by DgnTextStyle::AddListener which provides more detailed information.
See also
uSystemFunc_TextStyleChangeC
static SystemFunc_UnloadProgram SetUnloadProgramFunction ( SystemFunc_UnloadProgram  unloadFunction)
static

An MDL application can use this to set a function to be called when the application is about to be unloaded.

Parameters
[in]unloadFunctionThe new function to call, or NULL.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
See also
SystemFunc_UnloadProgram
static SystemFunc_UpdateSequenceChanged SetUpdateSequenceChangedFunction ( SystemFunc_UpdateSequenceChanged  newFunc)
static

Set a function that is called when the model update sequence is defined or modified.

Parameters
[in]newFuncThe new function to call.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
See also
SystemFunc_UpdateSequenceChanged
static SystemFunc_WindowClose SetWindowCloseFunction ( SystemFunc_WindowClose  newFunc)
static

Set a function that is called when a window is about to be closed.

The function set returns true if the window can be closed and false to keep it open.

Parameters
[in]newFuncThe new function to call.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
See also
SystemFunc_WindowClose
static SystemFunc_WindowsKeystrokeMessage SetWindowsKeystrokeMessageFunction ( SystemFunc_WindowsKeystrokeMessage  newFunc)
static

Set a function that is called for all keystroke related messages from Windows.

Parameters
[in]newFuncThe new function to call.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
See also
SystemFunc_WindowsKeystrokeMessage
static SystemFunc_WorkspaceChanged SetWorkspaceChangedFunction ( SystemFunc_WorkspaceChanged  newFunc)
static

Set a function that is called when the workspace, project, or interface changes.

Parameters
[in]newFuncThe new function to call.
Returns
The return value is the previous function that was set for this MdlApp, or NULL.
See also
uSystemFunc_WorkspaceChangedC

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.