Functions

Functions

StatusInt mdlRefFile_rotate (DgnModelRefP modelRef, Dpoint3d *pivotP, double xRotation, double yRotation, double zRotation, int view)
 Superseded by mdlRefFile_rotateAttachment. More...
 
StatusInt mdlRefFile_scale (DgnModelRefP modelRef, Dpoint3d *scalePointP, double scale)
 Superseded by mdlRefFile_scaleAttachment. More...
 
StatusInt mdlModelRef_getDisplayName (DgnModelRefP modelRef, WCharP displayName, unsigned int maxChars, WCharCP separator)
 Gets the string that MicroStation uses to display the name of the modelRef in its user interface. More...
 
StatusInt mdlRefFile_attach (DgnModelRefP *outModelRefP, WCharCP fileName, WCharCP logical, WCharCP description, DPoint3dCP masterOrigin, DPoint3dCP referenceOrigin, double scale, RotMatrixCP rotMatrix, int nClipPoints, DPoint2dCP clipPoints, DgnPlatform::RefInitialLevelDisplay initialLevelDisplay, bool snapLock, bool locateLock)
 Attaches a reference to the current design. More...
 
StatusInt mdlRefFile_attachByView (DgnModelRefP *outModelRefP, WCharCP fileName, WCharCP logical, WCharCP description, WCharCP viewName, double scale, DPoint3dCP centerPoint, DgnPlatform::RefInitialLevelDisplay initialLevelDisplay, bool snapLock, bool locateLock)
 Attaches a reference with a saved view from the reference file. More...
 
StatusInt mdlRefFile_attachCoincident (DgnModelRefP *outModelRefP, WCharCP fileName, WCharCP logical, WCharCP description, DgnPlatform::RefInitialLevelDisplay initialLevelDisplay, bool snapLock, bool locateLock)
 Attaches a reference that coincides exactly with the master file. More...
 
StatusInt mdlRefFile_attachCoincidentExtended (DgnModelRefP *outModelRefP, WCharCP fileName, WCharCP logical, WCharCP description, DgnPlatform::RefInitialLevelDisplay initialLevelDisplay, bool snapLock, bool locateLock, bool callAsynchs)
 Attaches a reference that coincides exactly with the master file. More...
 
StatusInt mdlRefFile_beginAttachmentToModel (DgnAttachmentBuilderR builder, WCharCP fileName, WCharCP modelName, WCharCP logical, WCharCP description, DgnModelRefP modelToAttachTo)
 Starts the process of attaching a reference to a model to the specified model. More...
 
StatusInt mdlRefFile_completeAttachment (DgnAttachmentP &attachment, DgnAttachmentBuilderR builder, DgnPlatform::RefAttachNestMode nestFlag, int nestDepth, bool initialDisplay)
 Completes the process of attaching a reference that was started by mdlRefFile_beginAttachmentToModel. More...
 
StatusInt mdlRefFile_setCoincidentWorldOrigin (DgnModelRefP modelRef)
 Sets the reference origins to appropriate values for attaching in "Coincident World" mode. More...
 
StatusInt mdlRefFile_detach (DgnModelRefP modelRef)
 Detaches the specified reference. More...
 
StatusInt mdlRefFile_setClip (DgnModelRefP modelRef, DPoint2dCP pts, int nverts)
 Sets a clip boundary for the specified reference. More...
 
StatusInt mdlRefFile_writeAttachment (DgnModelRefP modelRef)
 Writes the current attachment information for the specifed reference to its parent model. More...
 
StatusInt mdlRefFile_writeAttachmentConditionally (DgnModelRefP modelRef)
 Writes the current attachment parameters for the specifed reference to its parent model. More...
 
StatusInt mdlRefFile_writeAttachmentExtended (DgnModelRefP modelRef, bool writeParams, bool writeLevels, bool writeImmediately)
 Writes the current attachment information for the specifed reference to its parent model. More...
 
StatusInt mdlRefFile_reload (DgnModelRefP modelRef, bool updateDisplay, bool forceReload)
 Reloads the element data for the specified referenced model. More...
 
StatusInt mdlRefFile_getBooleanParameters (bool *value, RefBooleanParams paramName, DgnModelRefP modelRef)
 Gets boolean reference attachment settings. More...
 
StatusInt mdlRefFile_getStringParameters (WCharP value, size_t maxChars, RefStringParams paramName, DgnModelRefP modelRef)
 Gets string reference attachment settings. More...
 
StatusInt mdlRefFile_getDoubleParameters (double *value, RefDoubleParams paramName, DgnModelRefP modelRef)
 Gets double-valued reference attachment settings. More...
 
StatusInt mdlRefFile_getRotMatrixParameters (RotMatrixP matrix, RefMatrixParams paramName, DgnModelRefP modelRef)
 Retrieves Rotation matrix reference attachment settings. More...
 
StatusInt mdlRefFile_getIntegerParameters (UInt32 *value, RefIntegerParams paramName, DgnModelRefP modelRef)
 Gets integer reference attachment settings. More...
 
StatusInt mdlRefFile_getInt64Parameters (UInt64 *value, RefInt64Params paramName, DgnModelRefP modelRef)
 Gets int64 reference attachment settings. More...
 
StatusInt mdlRefFile_setBooleanParameters (bool newValue, RefBooleanParams paramName, DgnModelRefP modelRef)
 Changes boolean reference attachment settings. More...
 
StatusInt mdlRefFile_setStringParameters (WCharCP newValue, RefStringParams paramName, DgnModelRefP modelRef)
 Changes string reference attachment settings. More...
 
StatusInt mdlRefFile_setDoubleParameters (double newValue, RefDoubleParams paramName, DgnModelRefP modelRef)
 Changes double-valued reference attachment settings. More...
 
StatusInt mdlRefFile_setRotMatrixParameters (RotMatrixCP newMatrix, RefMatrixParams paramName, DgnModelRefP modelRef)
 Changes Rotation matrix reference attachment settings. More...
 
StatusInt mdlRefFile_setIntegerParameters (UInt32 newValue, RefIntegerParams paramName, DgnModelRefP modelRef)
 Changes integer reference attachment settings. More...
 
StatusInt mdlRefFile_updateReference (DgnModelRefP modelRef, DgnPlatform::DgnDrawMode displayMode)
 Updates the reference file in all views. More...
 
DgnAttachmentP mdlRefFile_getInfo (DgnModelRefP modelRef)
 Gets a the DgnAttachment structure for a modelRef. More...
 
bool mdlRefFile_getLocateLock (DgnAttachmentP refP)
 Gets the current setting of the Locate Lock for the specified reference. More...
 
DgnPlatform::DgnAttachmentLocateStatus mdlRefFile_getLocateStatus (DgnAttachmentCP refP)
 Gets information about the locate lock status for the specified reference. More...
 
bool mdlRefFile_getSnapLock (DgnAttachmentP refP)
 Gets the current setting of the Snap Lock for the specified reference. More...
 
int mdlRefFile_getRefCount ()
 Gets the number of primary references that are attached to the currently active model. More...
 
DgnAttachmentCP mdlRefFile_getParent (DgnAttachmentCP refP)
 Gets the DgnAttachment structure for the parent of the specified attachment. More...
 
StatusInt mdlRefFile_getFromAttachmentID (DgnAttachmentP *refFilePP, DgnModelRefP *modelRefP, DgnModelRefP srcModelRef, DgnPlatform::ElementId attachmentID)
 Gets the DgnPlatform::DgnAttachment structure and or modelRef for a reference given the element ID of its attachment element. More...
 
DgnPlatform::ElementId mdlRefFile_attachmentIdFromModelRef (DgnModelRefP modelRef)
 Gets the elementID for the reference attachment element ID of the specified reference. More...
 
bool mdlRefFile_is3d (DgnAttachmentCP refP)
 Determines whether the specified reference is three dimensional. More...
 
bool mdlRefFile_isPrimary (DgnAttachmentCP refP)
 Determines whether the specified reference is a primary reference (directly attached) for the currently active model. More...
 
StatusInt mdlRefFile_reattach (DgnModelRefP modelRef, WCharP outName, WCharCP fileName, WCharCP modelName)
 Changes the file or model to which the reference attachment refers. More...
 
StatusInt mdlRefFile_rotateAttachment (DgnModelRefP modelRef, Dpoint3d *pivotP, double xRotation, double yRotation, double zRotation, int view)
 Rotates a reference attachment. More...
 
StatusInt mdlRefFile_scaleAttachment (DgnModelRefP modelRef, Dpoint3d *scalePointP, double scale)
 Scales a reference attachment. More...
 
int mdlRefFile_transformAttachment (DgnModelRefP modelRef, TransformP transform, bool applyToClipElement)
 Transforms the reference attachment. More...
 
StatusInt mdlRefFile_copyAttachment (DgnModelRefP *pCopiedModelRef, DgnModelRefP modelRef, TransformP transform)
 Copies a reference attachment. More...
 
StatusInt mdlRefFile_setColorTableAdjustment (DgnModelRefP modelRef, int valueAdjustment, int saturationAdjustment, int hueValue, int hsvFlags, bool update)
 Adjust the color table used for displaying the reference according to the values supplied. More...
 

Detailed Description

Function Documentation

StatusInt mdlModelRef_getDisplayName ( DgnModelRefP  modelRef,
WCharP  displayName,
unsigned int  maxChars,
WCharCP  separator 
)

Gets the string that MicroStation uses to display the name of the modelRef in its user interface.

If the modelRef is a reference, the string consists of the logical name (if there is any), followed by the file name, followed by the model name (if there is more than one model in the file).

Parameters
[in]modelRefthe model for which to retrieve the name
[out]displayNamethe display name.
[in]maxCharsthe size of displayName, in MSWChars.
[in]separatorthe separator to use. Maximum size allowed is 10 wide chars. If NULL is passed in, ", " will be used by default.
Returns
MDLERR_NAMETOOLONG if name does not fit, MDLERR_BADMODELREF if invalid modelRef.
Remarks
To ensure that displayName is large enough, supply a buffer that holds MAX_MODEL_DISPLAY_LENGTH MSWChars.
See also
mdlRefFile_getInfo
StatusInt mdlRefFile_attach ( DgnModelRefP *  outModelRefP,
WCharCP  fileName,
WCharCP  logical,
WCharCP  description,
DPoint3dCP  masterOrigin,
DPoint3dCP  referenceOrigin,
double  scale,
RotMatrixCP  rotMatrix,
int  nClipPoints,
DPoint2dCP  clipPoints,
DgnPlatform::RefInitialLevelDisplay  initialLevelDisplay,
bool  snapLock,
bool  locateLock 
)

Attaches a reference to the current design.

Allows control of attachment geometry.

Parameters
[out]outModelRefPmodelRef that refers to the resulting attachment
[in]fileNamereference file to be attached.
[in]logicalreference logical name. Unique logical names are required for duplicate attachments of the same model within a particular file.
[in]descriptionreference description. NULL can be passed if no description is desired.
[in]masterOriginattachment origin in the current coordinate system.
[in]referenceOriginattachment origin in the reference file. Specified in reference file UORs, not the current coordinate system.
[in]scaleratio of master file UORs to reference file UORs.
[in]rotMatrixrotation matrix from the reference file to the master file. NULL can be passed if no rotation is required.
[in]nClipPointsnumber of points in the clipPoints array.
[in]clipPointspointer to the clipping point array. If the number of clipping points is zero or if NULL is passed for clipPoints, the clipping boundary is set to the entire design plane.
[in]initialLevelDisplaycurrently ignored. Pass REF_FILE_LEVEL_DISPLAY_DEFAULT for future compatibility.
[in]snapLocksets the snap lock bit for the reference.
[in]locateLocksets the locate lock bit for the reference.
Returns
SUCCESS if the reference is successfully attached or one of the following error codes:
Value Description
MDLERR_CANNOTOPENFILE Reference file cannot be opened.
MDLERR_NOTDESIGNFILE The specified file is not a valid design file.
MDLERR_DUPLICATELOGICAL Duplicate attachment with non-unique logical name.
MDLERR_INVALIDREFORG Reference origin off from design plane.
MDLERR_INVALIDMASTERORG Master origin is off the design plane.
Remarks
If filename does not provide a full file specification, the master file path and the environment variables MS_RFDIR and MS_DEF are searched sequentially for the file.
If the working unit values for each file are known, scale should be set to the ratio of master file UORs to reference file UORs. If the working units of the reference file are not known, the reference file should be attached coincident so that its subunits and positional units can be extracted. The scale factor can then computed and used as the scale parameter.
Required Library: mdlbltin.lib
This function always attaches the default model of the specified file.
See also
mdlRefFile_extendedAttach mdlRefFile_attachCoincident mdlRefFile_attachByView
StatusInt mdlRefFile_attachByView ( DgnModelRefP *  outModelRefP,
WCharCP  fileName,
WCharCP  logical,
WCharCP  description,
WCharCP  viewName,
double  scale,
DPoint3dCP  centerPoint,
DgnPlatform::RefInitialLevelDisplay  initialLevelDisplay,
bool  snapLock,
bool  locateLock 
)

Attaches a reference with a saved view from the reference file.

Parameters
[out]outModelRefPmodelRef for the reference attachment
[in]fileNamereference file to be attached.
[in]logicalreference logical name. Unique logical names are required for duplicate attachments of the same model within a particular file.
[in]descriptionreference description. NULL can be passed if no description is desired.
[in]viewNamename of the saved view to be used in attaching the reference file. This view must have been saved in the reference file.
[in]scaleratio of master file UORs to reference file UORs.
[in]centerPointpoint in the current coordinate system of the master file where the center of the named view should be located.
[in]initialLevelDisplaycurrently ignored. Pass REF_FILE_LEVEL_DISPLAY_DEFAULT for future compatibility.
[in]snapLocksets the snap lock bit for the reference.
[in]locateLocksets the locate lock bit for the reference.
Returns
SUCCESS if the reference is successfully attached or one of the following error codes:
Value Description
MDLERR_CANNOTOPENFILE Reference file cannot be opened.
MDLERR_NOTDESIGNFILE The specified file is not a valid design file.
MDLERR_DUPLICATELOGICAL Duplicate attachment with non-unique logical name.
MDLERR_INVALIDREFORG Reference origin off from design plane.
MDLERR_INVALIDMASTERORG Master origin is off the design plane.
Remarks
If filename does not provide a full file specification, the master file path and the environment variables MS_RFDIR and MS_DEF are searched sequentially for the file.
This function always attaches the default model of the specified file.
Required Library: mdlbltin.lib
See also
mdlRefFile_extendedAttach mdlRefFile_attachCoincident mdlRefFile_attach
StatusInt mdlRefFile_attachCoincident ( DgnModelRefP *  outModelRefP,
WCharCP  fileName,
WCharCP  logical,
WCharCP  description,
DgnPlatform::RefInitialLevelDisplay  initialLevelDisplay,
bool  snapLock,
bool  locateLock 
)

Attaches a reference that coincides exactly with the master file.

Parameters
[out]outModelRefPmodelRef that refers to the resulting attachment
[in]fileNamereference file to be attached.
[in]logicalreference logical name. Unique logical names are required for duplicate attachments of the same model within a particular file.
[in]descriptionreference description. NULL can be passed if no description is desired.
[in]initialLevelDisplaycurrently ignored. Pass REF_FILE_LEVEL_DISPLAY_DEFAULT for future compatibility.
[in]snapLocksets the snap lock bit for the reference.
[in]locateLocksets the locate lock bit for the reference.
Returns
SUCCESS if the reference is successfully attached or one of the following error codes:
Value Description
MDLERR_CANNOTOPENFILE Reference file cannot be opened.
MDLERR_NOTDESIGNFILE The specified file is not a valid design file.
MDLERR_DUPLICATELOGICAL Duplicate attachment with non-unique logical name.
Remarks
If filename does not provide a full file specification, the master file path and the environment variables MS_RFDIR and MS_DEF are searched sequentially for the file.
This function always attaches the default model of the specified file.
Required Library: mdlbltin.lib
See also
mdlRefFile_extendedAttach mdlRefFile_attach
StatusInt mdlRefFile_attachCoincidentExtended ( DgnModelRefP *  outModelRefP,
WCharCP  fileName,
WCharCP  logical,
WCharCP  description,
DgnPlatform::RefInitialLevelDisplay  initialLevelDisplay,
bool  snapLock,
bool  locateLock,
bool  callAsynchs 
)

Attaches a reference that coincides exactly with the master file.

Unlike mdlRefFile_attachCoincident, allows the programmer to determines whether user hook functions are called.

Parameters
[out]outModelRefPmodelRef that refers to the resulting attachment
[in]fileNamereference file to be attached.
[in]logicalreference logical name. Unique logical names are required for duplicate attachments of the same model within a particular file.
[in]descriptionreference description. NULL can be passed if no description is desired.
[in]initialLevelDisplaycurrently ignored. Pass REF_FILE_LEVEL_DISPLAY_DEFAULT for future compatibility.
[in]snapLocksets the snap lock bit for the reference.
[in]locateLocksets the locate lock bit for the reference.
[in]callAsynchsspecifies whether user hook functions should be called. This should be set true under most circumstances.
Remarks
If filename does not provide a full file specification, the master file path and the environment variables MS_RFDIR and MS_DEF are searched sequentially for the file.
This function always attaches the default model of the specified file.
Returns
SUCCESS if the reference is successfully attached or one of the following error codes:
Value Description
MDLERR_CANNOTOPENFILE Reference file cannot be opened.
MDLERR_NOTDESIGNFILE The specified file is not a valid design file.
MDLERR_DUPLICATELOGICAL Duplicate attachment with non-unique logical name.
Remarks
Required Library: mdlbltin.lib
See also
mdlRefFile_attachCoincident
DgnPlatform::ElementId mdlRefFile_attachmentIdFromModelRef ( DgnModelRefP  modelRef)

Gets the elementID for the reference attachment element ID of the specified reference.

Parameters
[in]modelRefthe model reference of the model to get the ID for
Returns
The DgnPlatform::ElementId of the specified modelRef, or 0 if the modelRef is not a valid reference.
Remarks
Required Library: mdlbltin.lib
See also
mdlModelRef_getParent
mdlRefFile_getAttachmentFromID
StatusInt mdlRefFile_beginAttachmentToModel ( DgnAttachmentBuilderR  builder,
WCharCP  fileName,
WCharCP  modelName,
WCharCP  logical,
WCharCP  description,
DgnModelRefP  modelToAttachTo 
)

Starts the process of attaching a reference to a model to the specified model.

After calling this function, you should complete the attachment process by calling mdlRefFile_completeAttachment. Between mdlRefFile_beginAttachment and mdlRefFile_completeAttachment, the reference modification routines can be called on the return modelRef.

Parameters
[out]builderobject that refers to the resulting attachment
[in]fileNamereference file to be attached.
[in]modelNamemodel within fileName that should be referenced. If NULL, the default model is used.
[in]logicalreference logical name. Unique logical names are required for duplicate attachments of the same model within a particular file.
[in]descriptionreference description. NULL can be passed if no description is desired.
[in]modelToAttachTothe model that the reference is to be attached to.
Returns
SUCCESS if the reference attachment is successfully started, or one of the following error codes:
Value Description
MDLERR_CANNOTOPENFILE Reference file cannot be opened.
MDLERR_NOTDESIGNFILE The specified file is not a valid design file.
MDLERR_MODELNOTFOUND The specified file does not contain the specified model.
Remarks
If filename does not provide a full file specification, the file path of the model to which the reference is attached and the environment variables MS_RFDIR and MS_DEF are searched sequentially for the file.
modelToAttachTo can be the returned modelRef from mdlWorkDgn_openFile or mdlWorkDgn_createFile.
Required Library: mdlbltin.lib
See also
mdlRefFile_completeAttachment mdlRefFile_beginAttachment
StatusInt mdlRefFile_completeAttachment ( DgnAttachmentP &  attachment,
DgnAttachmentBuilderR  builder,
DgnPlatform::RefAttachNestMode  nestFlag,
int  nestDepth,
bool  initialDisplay 
)

Completes the process of attaching a reference that was started by mdlRefFile_beginAttachmentToModel.

This function processes nested reference attachments and optionally displays the reference (if the reference is to the currently active model).

Parameters
[out]attachmentnew DgnAttachment that was created
[in]builderobject returned from mdlRefFile_beginAttachment
[in]nestFlagone of the following values:
Value Description
RefAttachNestMode::None No nesting (ignores the attachments to modelRef).
RefAttachNestMode::Copy Attach the references to modelRef as direct attachments to the parent modelRef, to nestDepth.
RefAttachNestMode::Display Display the references to modelRef as nested references, to nestDepth.
[in]nestDepthdepth for nesting
[in]initialDisplaytrue to do initial display of reference
Returns
SUCCESS if the reference is successfully attached or one of the following error codes:
Value Description
MDLERR_BADMODELREF modelRef not returned from mdlModelRef_beginAttachment.
MDLERR_DUPLICATELOGICAL Duplicate attachment with non-unique logical name.
MDLERR_FILEREADONLY The active model is read only, so the attachment is only temporary.
MDLERR_WRITEFAILED The active model is not read only, but an error prevented wrting the attachment to the active model.
Remarks
Required Library: mdlbltin.lib
See also
mdlRefFile_beginAttachmentToModelRef
StatusInt mdlRefFile_copyAttachment ( DgnModelRefP *  pCopiedModelRef,
DgnModelRefP  modelRef,
TransformP  transform 
)

Copies a reference attachment.

Parameters
[out]pCopiedModelRefthe modelRef for the copied reference.
[in]modelRefspecifies the modelRef for the reference to be copied.
[in]transformspecifies the transform to apply to the copied reference - if NULL, no transform is applied.
Returns
SUCCESS if the specified modelRef is a valid reference attachment and is copied successfully.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlRefFile_detach ( DgnModelRefP  modelRef)

Detaches the specified reference.

Parameters
[in]modelRefmodel to be detached.
Returns
SUCCESS or a non-zero error code.
Remarks
To detach all references, pass REFERENCE_All_References for modelRef.
Required Library: mdlbltin.lib
See also
mdlRefFile_attach mdlRefFile_attachoincidentC
StatusInt mdlRefFile_getBooleanParameters ( bool *  value,
RefBooleanParams  paramName,
DgnModelRefP  modelRef 
)

Gets boolean reference attachment settings.

Parameters
[out]valuethe value of the specified setting.
[in]paramNamea member of the RefBooleanParams enum that identifies the parameter to get.
[in]modelRefmodelRef for the reference to get the parameter value for
Returns
SUCCESS if the active parameter is retrieved; an error code if paramName is not one of the RefBooleanParams enumeration in mdl.h.
Remarks
The values that can be retrieved are as follows:
paramName description
REFERENCE_DISPLAY Attachment is successfully displayed
REFERENCE_DISPLAYFLAG Display flag is turned on
REFERENCE_SNAP Snap flag is turned on
REFERENCE_LOCATE Locate flag is turned on
REFERENCE_FILENOTFOUND File not found - read only
REFERENCE_SCALELINESTYLES Scale line styles
REFERENCE_HIDDEN_LINE Display in hidden line mode
REFERENCE_DISPLAY_HIDDEN Hidden lines displayed
REFERENCE_SCALE_BY_UNITS Use true scale
REFERENCE_ANONYMOUS Don't show in user interface
REFERENCE_DISPLAYRASTERREFS Display raster references
REFERENCE_USE_LIGHTS Use lights in attachment
REFERENCE_DONOTNEST Do not show as a nested attachment
REFERENCE_CLIPBACK Clip the back plane
REFERENCE_CLIPFRONT Clip the front plane
REFERENCE_DONTDETACHONALL Don't detach on Detach All command
REFERENCE_REDUNDANT Is redundant ref, read only
REFERENCE_DISPLAY and REFERENCE_DISPLAYFLAG are treated the same by mdlRefFile_setBooleanParams.
Required Library: mdlbltin.lib
See also
mdlRefFile_getBooleanParameters
StatusInt mdlRefFile_getDoubleParameters ( double *  value,
RefDoubleParams  paramName,
DgnModelRefP  modelRef 
)

Gets double-valued reference attachment settings.

Parameters
[out]valuethe new value of the specified setting.
[in]paramNamea member of the RefDoubleParams enum that identifies the parameter to set.
[in]modelRefmodelRef for the reference to set the parameter value for
Returns
SUCCESS if the active parameter is retrieved; an error code if either paramName is not one of the RefDoubleParams enumeration.
Remarks
The values that can be retrieved are as follows:
paramName Meaning
REFERENCE_SCALE Calculated scale, read only.
REFERENCE_SCALE_STORED Stored scale.
REFERENCE_TRANSPARENCY Transparency.
Required Library: mdlbltin.lib
See also
mdlRefFile_setDoubleParameters
StatusInt mdlRefFile_getFromAttachmentID ( DgnAttachmentP *  refFilePP,
DgnModelRefP *  modelRefP,
DgnModelRefP  srcModelRef,
DgnPlatform::ElementId  attachmentID 
)

Gets the DgnPlatform::DgnAttachment structure and or modelRef for a reference given the element ID of its attachment element.

Parameters
[out]refFilePPpointer to a pointer for the DgnPlatform::DgnAttachment structure pointer for the specified reference attachment
[out]modelRefPpointer to the modelRef for the attached model
[in]srcModelRefthe modelRef that contains the attachment ID
[in]attachmentIDthe unique element ID for the reference attachment element
Returns
SUCCESS if the modelRef was found, otherwise ERROR
Remarks
Required Library: mdlbltin.lib
See also
mdlRefFile_attachmentFromModelRef
DgnAttachmentP mdlRefFile_getInfo ( DgnModelRefP  modelRef)

Gets a the DgnAttachment structure for a modelRef.

Parameters
[in]modelRefmodelRef to get the ReferenceFile structure for.
Returns
A pointer to the DgnAttachment structure for the specified reference, or NULL if the modelRef is not a valid reference attachment.
Remarks
Required Library: mdlbltin.lib
See also
mdlRefFile_getLocateLock mdlRefFile_getSnapLock
StatusInt mdlRefFile_getInt64Parameters ( UInt64 value,
RefInt64Params  paramName,
DgnModelRefP  modelRef 
)

Gets int64 reference attachment settings.

Parameters
[out]valuethe value of the specified setting.
[in]paramNamea member of the RefInt64 Params enum that identifies the parameter to get.
[in]modelRefmodelRef for the reference to set the parameter value for
Returns
SUCCESS if the active parameter is changed; an error code if either paramName is not one of the RefIntegerParams enumeration in mdl.h.
Remarks
The values that can be retrieved are as follows:
paramName Meaning
REFERENCE_ELEMENTID ElementID of the Attachment element. Read only.
REFERENCE_SAVEDVIEWELEMENTID ElementID of the Saved View element. Read only.
Required Library: mdlbltin.lib
See also
mdlRefFile_setInt64Parameters
StatusInt mdlRefFile_getIntegerParameters ( UInt32 value,
RefIntegerParams  paramName,
DgnModelRefP  modelRef 
)

Gets integer reference attachment settings.

Parameters
[out]valuethe value of the specified setting.
[in]paramNamea member of the RefIntegerParams enum that identifies the parameter to get.
[in]modelRefmodelRef for the reference to set the parameter value for
Returns
SUCCESS if the active parameter is changed; an error code if either paramName is not one of the RefIntegerParams enumeration in mdl.h.
Remarks
The values that can be retrieved are as follows:
paramName Meaning
REFERENCE_NESTDEPTH Nesting depth.
REFERENCE_RENDERMODE Render Mode.
REFERENCE_LEVEL_OVERRIDES Level Override value, one of the RefLevelOverrides values.
REFERENCE_HSVVALUEADJUST HSV value adjustment, read only
REFERENCE_HSVSATURATIONADJUST HSV saturation adjustment, read only
REFERENCE_SYNCHWITHNAMEDVIEWOPTION Reference synch option - returns one of the ReferenceSynchOption values
Required Library: mdlbltin.lib
See also
mdlRefFile_setIntegerParameters
bool mdlRefFile_getLocateLock ( DgnAttachmentP  refP)

Gets the current setting of the Locate Lock for the specified reference.

Parameters
[in]refPthe DgnPlatform::DgnAttachment structure for the reference.
Returns
true if the Locate Lock is enabled for this reference and all of its parent references, if it is a nested attachment.
Remarks
Use mdlRefFile_getInfo to obtain the DgnPlatform::DgnAttachment structure from a modelRef.
You can also use mdlRefFile_getBooleanParameters with paramName of REFERENCE_LOCATE, but this version is more convenienent for use in expressions since it returns the value.
Required Library: mdlbltin.lib
See also
mdlRefFile_getInfo mdlRefFile_getSnapLock mdlRefFile_getLocateStatus
DgnPlatform::DgnAttachmentLocateStatus mdlRefFile_getLocateStatus ( DgnAttachmentCP  refP)

Gets information about the locate lock status for the specified reference.

Parameters
[in]refPthe DgnPlatform::DgnAttachment structure for the reference.
Returns
One of the following constants defined in mdl.h
Value Description
DgnAttachmentLocateStatus::LocateOn The reference and all of its parent references have locate lock on, and all of them have the Export right.
DgnAttachmentLocateStatus::LocateOn Locate lock is off for the reference.
DgnAttachmentLocateStatus::ParentLocateOff Locate lock is off for one of the reference's parent references.
DgnAttachmentLocateStatus::NoLocateRights The reference does not has the Export right.
DgnAttachmentLocateStatus::ParentNoLocateRights One of the references' parent references does not has the Export right.
Remarks
Use mdlRefFile_getInfo to obtain the DgnPlatform::DgnAttachment structure from a modelRef.
This function returns more detailed information than mdlRefFile_getLocateLock.
Required Library: mdlbltin.lib
See also
mdlRefFile_getInfo mdlRefFile_getSnapLock mdlRefFile_getLocateLock
DgnAttachmentCP mdlRefFile_getParent ( DgnAttachmentCP  refP)

Gets the DgnAttachment structure for the parent of the specified attachment.

Parameters
refPIN the DgnAttachment structure for the reference.
Remarks
Use mdlRefFile_getInfo to obtain the DgnAttachment structure from a modelRef.
Returns
A pointer to the DgnAttachment structure for the parent file, or NULL if refP is for a non-nested attachment.
Remarks
Required Library: mdlbltin.lib
See also
mdlRefFile_getInfo
int mdlRefFile_getRefCount ( )

Gets the number of primary references that are attached to the currently active model.

Returns
The number of references attached.
Remarks
Required Library: mdlbltin.lib
See also
mdlRefFile_getParent mdlRefFile_isPrimary
StatusInt mdlRefFile_getRotMatrixParameters ( RotMatrixP  matrix,
RefMatrixParams  paramName,
DgnModelRefP  modelRef 
)

Retrieves Rotation matrix reference attachment settings.

Parameters
[out]matrixthe new value of the specified setting.
[in]paramNamea member of the RefMatrixParams enum that identifies the parameter to set.
[in]modelRefmodelRef for the reference to set the parameter value for
Returns
SUCCESS if the active parameter is retrieved; an error code if either paramName is not one of the RefMatrixParams enumeration in mdl.h;
Remarks
The values that can be retrieved are as follows:
paramName Meaning
REFERENCE_ROTATION The reference rotation matix
REFERENCE_CLIP_ROTMATRIX The reference clip rotation matrix
Required Library: mdlbltin.lib
See also
mdlRefFile_setMatrixParameters
bool mdlRefFile_getSnapLock ( DgnAttachmentP  refP)

Gets the current setting of the Snap Lock for the specified reference.

Parameters
[in]refPthe DgnPlatform::DgnAttachment structure for the reference.
Returns
true if the Locate Lock is enabled for this reference and all of its parent references, if it is a nested attachment.
Remarks
Use mdlRefFile_getInfo to obtain the DgnPlatform::DgnAttachment structure from a modelRef.
You can also use mdlRefFile_getBooleanParameters with paramName of REFERENCE_SNAP, but this version is more convenienent for use in expressions since it returns the value.
Required Library: mdlbltin.lib
See also
mdlRefFile_getInfo mdlRefFile_getLocateLock
StatusInt mdlRefFile_getStringParameters ( WCharP  value,
size_t  maxChars,
RefStringParams  paramName,
DgnModelRefP  modelRef 
)

Gets string reference attachment settings.

Parameters
[out]valuethe value of the specified setting.
[in]maxCharsthe number of characters in the output value buffer.
[in]paramNamea member of the RefStringParams enum that identifies the parameter to set.
[in]modelRefmodelRef for the reference to set the parameter value for
Returns
SUCCESS if the active parameter is retrieved; an error code if either paramName is not one of the RefIntegerParams enumeration in mdl.h.
Remarks
All strings are set in Unicode.
The values that can be retrieved are as follows:
paramName Meaning
REFERENCE_ATTACHNAME Attachment named used in the user interface. Read only.
REFERENCE_FILENAME File name, Read only
REFERENCE_DESCRIPTION Attachment Description
REFERENCE_LOGICAL Attachment logical name
REFERENCE_MODELNAME Attachment model name
Required Library: mdlbltin.lib
See also
mdlRefFile_setStringParameters
bool mdlRefFile_is3d ( DgnAttachmentCP  refP)

Determines whether the specified reference is three dimensional.

Parameters
[in]refPa pointer to the DgnPlatform::DgnAttachment structure for the reference.
Returns
true if the reference is three dimensional.
Remarks
Use mdlRefFile_getInfo to obtain the DgnPlatform::DgnAttachment structure from a modelRef.
Required Library: mdlbltin.lib
See also
mdlRefFile_getInfo
bool mdlRefFile_isPrimary ( DgnAttachmentCP  refP)

Determines whether the specified reference is a primary reference (directly attached) for the currently active model.

Parameters
[in]refPa pointer to the DgnPlatform::DgnAttachment structure for the reference.
Returns
true if the reference is a primary attachment.
Remarks
Use mdlRefFile_getInfo to obtain the DgnPlatform::DgnAttachment structure from a modelRef.
Required Library: mdlbltin.lib
See also
mdlRefFile_getInfo
StatusInt mdlRefFile_reattach ( DgnModelRefP  modelRef,
WCharP  outName,
WCharCP  fileName,
WCharCP  modelName 
)

Changes the file or model to which the reference attachment refers.

Parameters
[in]modelRefspecifies the modelRef for the reference to be reattached.
[out]outNamethe full file spec of the file reattached. Can be NULL.
[in]fileNamespecifies the name of the new file for reference attachment.
[in]modelNamespecifies the name of the new model within the fileName for reference.
Returns
SUCCESS if the specified fileName/modelName is successfully attached or one of the following error codes:
Value Description
MDLERR_CANNOTOPENFILE Reference file cannot be opened.
MDLERR_NOTDESIGNFILE The specified file is not a valid design file.
MDLERR_MODELNOTFOUND The specified file does not contain the specified model.
Remarks
If filename does not provide a full file specification, the master file path and the environment variables MS_RFDIR and MS_DEF are searched sequentially for the file.
Required Library: mdlbltin.lib
StatusInt mdlRefFile_reload ( DgnModelRefP  modelRef,
bool  updateDisplay,
bool  forceReload 
)

Reloads the element data for the specified referenced model.

Parameters
[in]modelRefmodelRef for reference to reload.
[in]updateDisplaytrue to update the screen after reload.
[in]forceReloadspecifies whether the reload should happen regardless of whether the file containing the referenced data has changed.
Returns
SUCCESS if the reference attachment is reloaded, or one of the following error codes:
Value Description
MDLERR_BADMODELREF modelRef is not a valid reference modelRef.
MDLERR_RELOADNOTNEEDED the file has not changed since the most recent load of its data, and forceReload is false.
MDLERR_FiILENOTFOUND the reference file is not found.
Remarks
This function does not affect the attachment parameters, it only reloads the element data for the attached model.
Required Library: mdlbltin.lib
See also
mdlRefFile_attach mdlRefFile_updateReference
StatusInt mdlRefFile_rotate ( DgnModelRefP  modelRef,
Dpoint3d pivotP,
double  xRotation,
double  yRotation,
double  zRotation,
int  view 
)

Superseded by mdlRefFile_rotateAttachment.

It is maintained only for backwards compatibility.

Parameters
[in]modelRefthe reference to rotate
[in]pivotPthe point, in the active model coordinate system, to rotate about
[in]xRotationthe rotation angle about the X axis, in radians.
[in]yRotationthe rotation angle about the Y axis, in radians.
[in]zRotationthe rotation angle about the Z axis, in radians.
[in]viewthe view in which the rotation is to be applied in 3D design files. This parameter is ignored in 2D design files.
Returns
SUCCESS if the reference file is successfully rotated, or MDLERR_BADMODELREF if the modelRef is invalid.
See also
mdlRefFile_rotateAttachment mdlRefFile_scaleAttachment
StatusInt mdlRefFile_rotateAttachment ( DgnModelRefP  modelRef,
Dpoint3d pivotP,
double  xRotation,
double  yRotation,
double  zRotation,
int  view 
)

Rotates a reference attachment.

The rotation is performed using the specified axis rotation values and a view number defining the view which the rotation is to be based upon.

Parameters
[in]modelRefthe reference to rotate
[in]pivotPthe point, in the active model coordinate system, to rotate about
[in]xRotationthe rotation angle about the X axis, in radians.
[in]yRotationthe rotation angle about the Y axis, in radians.
[in]zRotationthe rotation angle about the Z axis, in radians.
[in]viewthe view in which the rotation is to be applied in 3D design files. This parameter is ignored in 2D design files.
Remarks
Only zRotation is valid for 2D design files - xRotation and yRotation are ignored in that case.
This function does not erase the old reference attachment or draw the new attachment, nor does it write the transformed attachment to the file. See mdlRefFile_update, mdlRefFile_writeAttachment and mdlRefFile_writeAttachmentConditionally to accomplish those tasks.
If the reference is clipped by an element, the clip element is rotated and immediately written to the file. In that case, the reference should always be written to the file to keep it in synch with its clipping element.
Returns
SUCCESS if the reference file is successfully rotated, or MDLERR_BADMODELREF if the modelRef is invalid.
Remarks
Required Library: mdlbltin.lib
See also
mdlRefFile_scaleAttachment
StatusInt mdlRefFile_scale ( DgnModelRefP  modelRef,
Dpoint3d scalePointP,
double  scale 
)

Superseded by mdlRefFile_scaleAttachment.

It is maintained only for backwards compatibility.

Parameters
[in]modelRefthe reference to scale
[in]scalePointPthe point to scale about
[in]scalethe scale factor to apply. The current reference scale is multiplied by this factor.
Returns
SUCCESS if the reference file is successfully scaled.
See also
mdlRefFile_rotateAttachment mdlRefFile_scaleAttachment
StatusInt mdlRefFile_scaleAttachment ( DgnModelRefP  modelRef,
Dpoint3d scalePointP,
double  scale 
)

Scales a reference attachment.

Parameters
[in]modelRefthe reference to scale
[in]scalePointPthe point to scale about
[in]scalethe scale factor to apply. The current reference scale is multiplied by this factor.
Returns
SUCCESS if the reference file is successfully scaled.
Remarks
This function does not erase the old reference attachment or draw the new attachment, nor does it write the transformed attachment to the file. See mdlRefFile_update, mdlRefFile_writeAttachment and mdlRefFile_writeAttachmentConditionally to accomplish those tasks.
If the reference is clipped by an element, the clip element is scaled and immediately written to the file. In that case, the reference should always be written to the file to keep it in synch with its clipping element.
Required Library: mdlbltin.lib
See also
mdlRefFile_rotateAttachment mdlRefFile_transformAttachment
StatusInt mdlRefFile_setBooleanParameters ( bool  newValue,
RefBooleanParams  paramName,
DgnModelRefP  modelRef 
)

Changes boolean reference attachment settings.

Parameters
[in]newValuethe new value of the specified setting.
[in]paramNamea member of the RefBooleanParams enum that identifies the parameter to set.
[in]modelRefmodelRef for the reference to set the parameter value for
Returns
SUCCESS if the active parameter is changed; an error code if either paramName is not one of the RefBooleanParams enumeration in mdl.h or cannot be changed through this function.
Remarks
The values that can be set are as follows:
paramName description
REFERENCE_DISPLAY Attachment is successfully displayed
REFERENCE_DISPLAYFLAG Display flag is turned on
REFERENCE_SNAP Snap flag is turned on
REFERENCE_LOCATE Locate flag is turned on
REFERENCE_FILENOTFOUND File not found - read only
REFERENCE_SCALELINESTYLES Scale line styles
REFERENCE_HIDDEN_LINE Display in hidden line mode
REFERENCE_DISPLAY_HIDDEN Hidden lines displayed
REFERENCE_SCALE_BY_UNITS Use true scale
REFERENCE_ANONYMOUS Don't show in user interface
REFERENCE_DISPLAYRASTERREFS Display raster references
REFERENCE_USE_LIGHTS Use lights in attachment
REFERENCE_DONOTNEST Do not show as a nested attachment
REFERENCE_CLIPBACK Clip the back plane
REFERENCE_CLIPFRONT Clip the front plane
REFERENCE_DONTDETACHONALL Don't detach on Detach All command
REFERENCE_REDUNDANT Is redundant ref, read only
REFERENCE_DISPLAY and REFERENCE_DISPLAYFLAG are treated the same by mdlRefFile_setBooleanParams.
Required Library: mdlbltin.lib
See also
mdlRefFile_getBooleanParameters
StatusInt mdlRefFile_setClip ( DgnModelRefP  modelRef,
DPoint2dCP  pts,
int  nverts 
)

Sets a clip boundary for the specified reference.

Parameters
[in]modelRefmodelRef for reference to clip.
[in]ptsarray of points specifying the vertices of the boundary
[in]nvertsnumber of vertices in the pts array.
Returns
SUCCESS if the reference is successfully clipped or one of the following error codes:
Value Description
MDLERR_BADMODELREF modelRef is not a valid reference modelRef.
MDLERR_INVALIDCLIP The number of clipping points is less than 4 or greater than 2500.
Remarks
Required Library: mdlbltin.lib
If pts is NULL and nverts is 0, any existing reference clipping is cleared.
See also
mdlRefFile_beginAttachment
StatusInt mdlRefFile_setCoincidentWorldOrigin ( DgnModelRefP  modelRef)

Sets the reference origins to appropriate values for attaching in "Coincident World" mode.

Parameters
[in]modelRefmodel to be set coincident world origins for.
Returns
SUCCESS or MDLERR_BADMODELREF if modelRef is not a valid reference DgnModelRefP.
Remarks
This function is generally called between the mdlRefFile_beginAttachment and mdlRefFile_completeAttachment functions.
Required Library: mdlbltin.lib
See also
mdlRefFile_attachCoincident mdlRefFile_beginAttachment mdlRefFile_completeAttachment
StatusInt mdlRefFile_setColorTableAdjustment ( DgnModelRefP  modelRef,
int  valueAdjustment,
int  saturationAdjustment,
int  hueValue,
int  hsvFlags,
bool  update 
)

Adjust the color table used for displaying the reference according to the values supplied.

Parameters
[in]modelRefthe reference for which the color table is adjusted.
[in]valueAdjustmentthe value adjustment in HSV space. If the REFHSVADJUST_SATVAL_FIXED flag is set, then the value is used for every color in the color table. If the REFHSVADJUST_SATVAL_FIXED flag is not set, then the HSV value for each color in the color table is multiplied by (100 - valueAdjustment) / 100. Valid range is 0 (brightest) to 100 (darkest).
[in]saturationAdjustmentthe saturation adjustment in HSV space. If the REFHSVADJUST_SATVAL_FIXED flag is set, then the saturation is used for every color in the color table. If the REFHSVADJUST_SATVAL_FIXED flag is not set, then the HSV saturation for each color in the color table is multiplied by (100 - saturagionAdjustment) / 100. Valid range is 0 (most saturated colors) to 100 (least saturated colors).
[in]hueValueif the REFHSVADJUST_HUE_FIXED flag is or'ed into hueFlags, the hue specifed is used for each color in the color table. If the REFHSVADJUST_HUE_FIXED flag is not set, hueValue is ignored. Valid range is 0 to 360.
[in]hsvFlagsany "or" combination of REFHSVADJUST_SATVAL_FIXED and REFHSVADJUST_HUE_FIXED.
[in]updatetrue if the reference should be immediately redrawn with the new color table adjustments
Remarks
The adjustment takes place in HSV color space.
Returns
SUCCESS if the specified modelRef is a valid reference attachment and all input arguments are in the proper range, MDLERR_BADARG otherwise.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlRefFile_setDoubleParameters ( double  newValue,
RefDoubleParams  paramName,
DgnModelRefP  modelRef 
)

Changes double-valued reference attachment settings.

Parameters
[in]newValuethe new value of the specified setting.
[in]paramNamea member of the RefDoubleParams enum that identifies the parameter to set.
[in]modelRefmodelRef for the reference to set the parameter value for
Returns
SUCCESS if the active parameter is changed; an error code if either paramName is not one of the RefDoubleParams enumeration; or the value in param was out of range;
Remarks
The values that can be set are as follows:
paramName Meaning
REFERENCE_SCALE Calculated scale, read only.
REFERENCE_SCALE_STORED Stored scale.
REFERENCE_TRANSPARENCY Transparency.
Required Library: mdlbltin.lib
See also
mdlRefFile_getDoubleParameters
StatusInt mdlRefFile_setIntegerParameters ( UInt32  newValue,
RefIntegerParams  paramName,
DgnModelRefP  modelRef 
)

Changes integer reference attachment settings.

Parameters
[in]newValuethe new value of the specified setting.
[in]paramNamea member of the RefIntegerParams enum that identifies the parameter to set.
[in]modelRefmodelRef for the reference to set the parameter value for
Returns
SUCCESS if the active parameter is changed; an error code if either paramName is not one of the RefIntegerParams enumeration in mdl.h; or the value in param was out of range;
Remarks
The values that can be set are as follows:
paramName Meaning
REFERENCE_NESTDEPTH Nesting depth.
REFERENCE_RENDERMODE Render Mode.
REFERENCE_LEVEL_OVERRIDES Level Override value, one of the RefLevelOverrides values.
REFERENCE_HSVVALUEADJUST HSV value adjustment, read only
REFERENCE_HSVSATURATIONADJUST HSV saturation adjustment, read only
Required Library: mdlbltin.lib
See also
mdlRefFile_getIntegerParameters
StatusInt mdlRefFile_setRotMatrixParameters ( RotMatrixCP  newMatrix,
RefMatrixParams  paramName,
DgnModelRefP  modelRef 
)

Changes Rotation matrix reference attachment settings.

Parameters
[in]newMatrixthe new value of the specified setting.
[in]paramNamea member of the RefMatrixParams enum that identifies the parameter to set.
[in]modelRefmodelRef for the reference to set the parameter value for
Returns
SUCCESS if the active parameter is changed; an error code if either paramName is not one of the RefMatrixParams enumeration in mdl.h; or the value in param was out of range;
Remarks
The values that can be set are as follows:
paramName Meaning
REFERENCE_ROTATION The reference rotation matix
REFERENCE_CLIP_ROTMATRIX The reference clip rotation matrix
Required Library: mdlbltin.lib
See also
mdlRefFile_getRotMatrixParameters
StatusInt mdlRefFile_setStringParameters ( WCharCP  newValue,
RefStringParams  paramName,
DgnModelRefP  modelRef 
)

Changes string reference attachment settings.

Parameters
[in]newValuethe new value of the specified setting.
[in]paramNamea member of the RefStringParams enum that identifies the parameter to set.
[in]modelRefmodelRef for the reference to set the parameter value for
Returns
SUCCESS if the active parameter is changed; an error code if either paramName is not one of the RefStringParams enumeration in mdl.h; or the value in param was out of range;
Remarks
All strings are set in Unicode.
The values that can be set are as follows:
paramName Meaning
REFERENCE_ATTACHNAME Attachment named used in the user interface. Read only.
REFERENCE_FILENAME File name, Read only
REFERENCE_DESCRIPTION Attachment Description
REFERENCE_LOGICAL Attachment logical name
REFERENCE_MODELNAME Attachment model name
Required Library: mdlbltin.lib
See also
mdlRefFile_getStringParameters
int mdlRefFile_transformAttachment ( DgnModelRefP  modelRef,
TransformP  transform,
bool  applyToClipElement 
)

Transforms the reference attachment.

Parameters
[in]modelRefspecifies the modelRef for the reference to be transformed.
[in]transformspecifies the transform to apply to the reference.
[in]applyToClipElementif true, applies the transform to the clip element for the reference, if clipped by element.
Returns
SUCCESS if the specified modelRef is a valid reference attachment, MDLERR_BADMODELREF otherwise.
Remarks
This function does not erase the old reference attachment or draw the new attachment, nor does it write the transformed attachment to the file. See mdlRefFile_update, mdlRefFile_writeAttachment and mdlRefFile_writeAttachmentConditionally to accomplish those tasks.
If applyToClipElement is specified and the reference is clipped by an element, the transformed clip element is immediately written to the file. In that case, the reference should always be written to the file to keep it in synch with its clipping element.
Required Library: mdlbltin.lib
StatusInt mdlRefFile_updateReference ( DgnModelRefP  modelRef,
DgnPlatform::DgnDrawMode  displayMode 
)

Updates the reference file in all views.

Parameters
[in]modelRefmodelRef for reference to update
[in]displayModeone of the display modes defined in mdl.h. Most commonly used are DRAW_MODE_Normal, ERASE, and HILITE.
Returns
SUCCESS, or MDLERR_BADMODELREF if the modelRef is not valid.
Remarks
The display mode definitions are included in msdefs.h.
Required Library: mdlbltin.lib
See also
mdlRefFile_reload
StatusInt mdlRefFile_writeAttachment ( DgnModelRefP  modelRef)

Writes the current attachment information for the specifed reference to its parent model.

Parameters
[in]modelRefmodelRef for reference to write.
Returns
SUCCESS if the reference attachment is successfully written or one of the following error codes:
Value Description
MDLERR_BADMODELREF modelRef is not a valid reference modelRef.
MDLERR_NOTDIRECTATTACHMENT modelRef refers to a nested reference.
Remarks
Required Library: mdlbltin.lib
See also
mdlRefFile_reload mdlRefFile_writeAttachmentConditionally mdlRefFile_writeAttachmentExtended
StatusInt mdlRefFile_writeAttachmentConditionally ( DgnModelRefP  modelRef)

Writes the current attachment parameters for the specifed reference to its parent model.

In earlier versions of MicroStation, this looked at a user preference that allowed the user to defer writing reference change until "Save Settings". This preference has been removed in 08.21 and later.

Parameters
[in]modelRefmodelRef for reference to write.
Returns
SUCCESS if the reference attachment is successfully written or one of the following error codes:
Value Description
MDLERR_BADMODELREF modelRef is not a valid reference modelRef.
MDLERR_NOTDIRECTATTACHMENT modelRef refers to a nested reference.
Remarks
Required Library: mdlbltin.lib
See also
mdlRefFile_reload mdlRefFile_writeAttachment mdlRefFile_writeAttachmentExtended
StatusInt mdlRefFile_writeAttachmentExtended ( DgnModelRefP  modelRef,
bool  writeParams,
bool  writeLevels,
bool  writeImmediately 
)

Writes the current attachment information for the specifed reference to its parent model.

The caller specifies whether the reference parameters (display, snap, locate and other flags, clipping, scale, position, and rotation) are written and whether the reference level display masks are written. Calling with writeParams true, writeLevels false, and writeImmediately false gives the same result as mdlRefFile_writeAttachmentConditionally and gives the best compatibility with MicroStation's reference manipulation tools.

Parameters
[in]modelRefmodelRef for reference to write.
[in]writeParamsif true, writes all reference parameters (e.g., display, scale, rotation, position) except level display masks.
[in]writeLevelsif true, writes the level display masks.
[in]writeImmediatelythis argument is ignored. In earlier versions of MicroStation, it looked at the "Reference->Save Settings to Save Changes" user preference, but that has been removed in 08.21 and later versions.
Returns
SUCCESS if the reference attachment is successfully written or one of the following error codes:
Value Description
MDLERR_BADMODELREF modelRef is not a valid reference modelRef.
MDLERR_NOTDIRECTATTACHMENT modelRef refers to a nested reference.
Remarks
Required Library: mdlbltin.lib
See also
mdlRefFile_reload mdlRefFile_writeAttachment mdlRefFile_writeAttachmentConditionally

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