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... | |
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).
[in] | modelRef | the model for which to retrieve the name |
[out] | displayName | the display name. |
[in] | maxChars | the size of displayName, in MSWChars. |
[in] | separator | the separator to use. Maximum size allowed is 10 wide chars. If NULL is passed in, ", " will be used by default. |
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.
[out] | outModelRefP | modelRef that refers to the resulting attachment |
[in] | fileName | reference file to be attached. |
[in] | logical | reference logical name. Unique logical names are required for duplicate attachments of the same model within a particular file. |
[in] | description | reference description. NULL can be passed if no description is desired. |
[in] | masterOrigin | attachment origin in the current coordinate system. |
[in] | referenceOrigin | attachment origin in the reference file. Specified in reference file UORs, not the current coordinate system. |
[in] | scale | ratio of master file UORs to reference file UORs. |
[in] | rotMatrix | rotation matrix from the reference file to the master file. NULL can be passed if no rotation is required. |
[in] | nClipPoints | number of points in the clipPoints array. |
[in] | clipPoints | pointer 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] | initialLevelDisplay | currently ignored. Pass REF_FILE_LEVEL_DISPLAY_DEFAULT for future compatibility. |
[in] | snapLock | sets the snap lock bit for the reference. |
[in] | locateLock | sets the locate lock bit for the reference. |
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. |
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.
[out] | outModelRefP | modelRef for the reference attachment |
[in] | fileName | reference file to be attached. |
[in] | logical | reference logical name. Unique logical names are required for duplicate attachments of the same model within a particular file. |
[in] | description | reference description. NULL can be passed if no description is desired. |
[in] | viewName | name of the saved view to be used in attaching the reference file. This view must have been saved in the reference file. |
[in] | scale | ratio of master file UORs to reference file UORs. |
[in] | centerPoint | point in the current coordinate system of the master file where the center of the named view should be located. |
[in] | initialLevelDisplay | currently ignored. Pass REF_FILE_LEVEL_DISPLAY_DEFAULT for future compatibility. |
[in] | snapLock | sets the snap lock bit for the reference. |
[in] | locateLock | sets the locate lock bit for the reference. |
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. |
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.
[out] | outModelRefP | modelRef that refers to the resulting attachment |
[in] | fileName | reference file to be attached. |
[in] | logical | reference logical name. Unique logical names are required for duplicate attachments of the same model within a particular file. |
[in] | description | reference description. NULL can be passed if no description is desired. |
[in] | initialLevelDisplay | currently ignored. Pass REF_FILE_LEVEL_DISPLAY_DEFAULT for future compatibility. |
[in] | snapLock | sets the snap lock bit for the reference. |
[in] | locateLock | sets the locate lock bit for the reference. |
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. |
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.
[out] | outModelRefP | modelRef that refers to the resulting attachment |
[in] | fileName | reference file to be attached. |
[in] | logical | reference logical name. Unique logical names are required for duplicate attachments of the same model within a particular file. |
[in] | description | reference description. NULL can be passed if no description is desired. |
[in] | initialLevelDisplay | currently ignored. Pass REF_FILE_LEVEL_DISPLAY_DEFAULT for future compatibility. |
[in] | snapLock | sets the snap lock bit for the reference. |
[in] | locateLock | sets the locate lock bit for the reference. |
[in] | callAsynchs | specifies whether user hook functions should be called. This should be set true under most circumstances. |
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. |
DgnPlatform::ElementId mdlRefFile_attachmentIdFromModelRef | ( | DgnModelRefP | modelRef | ) |
Gets the elementID for the reference attachment element ID of the specified reference.
[in] | modelRef | the model reference of the model to get the ID for |
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.
[out] | builder | object that refers to the resulting attachment |
[in] | fileName | reference file to be attached. |
[in] | modelName | model within fileName that should be referenced. If NULL, the default model is used. |
[in] | logical | reference logical name. Unique logical names are required for duplicate attachments of the same model within a particular file. |
[in] | description | reference description. NULL can be passed if no description is desired. |
[in] | modelToAttachTo | the model that the reference is to be attached to. |
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. |
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).
[out] | attachment | new DgnAttachment that was created | ||||||||
[in] | builder | object returned from mdlRefFile_beginAttachment | ||||||||
[in] | nestFlag | one of the following values:
| ||||||||
[in] | nestDepth | depth for nesting | ||||||||
[in] | initialDisplay | true to do initial display of reference |
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. |
StatusInt mdlRefFile_copyAttachment | ( | DgnModelRefP * | pCopiedModelRef, |
DgnModelRefP | modelRef, | ||
TransformP | transform | ||
) |
Copies a reference attachment.
[out] | pCopiedModelRef | the modelRef for the copied reference. |
[in] | modelRef | specifies the modelRef for the reference to be copied. |
[in] | transform | specifies the transform to apply to the copied reference - if NULL, no transform is applied. |
StatusInt mdlRefFile_detach | ( | DgnModelRefP | modelRef | ) |
Detaches the specified reference.
[in] | modelRef | model to be detached. |
StatusInt mdlRefFile_getBooleanParameters | ( | bool * | value, |
RefBooleanParams | paramName, | ||
DgnModelRefP | modelRef | ||
) |
Gets boolean reference attachment settings.
[out] | value | the value of the specified setting. |
[in] | paramName | a member of the RefBooleanParams enum that identifies the parameter to get. |
[in] | modelRef | modelRef for the reference to get the parameter value for |
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 |
StatusInt mdlRefFile_getDoubleParameters | ( | double * | value, |
RefDoubleParams | paramName, | ||
DgnModelRefP | modelRef | ||
) |
Gets double-valued reference attachment settings.
[out] | value | the new value of the specified setting. |
[in] | paramName | a member of the RefDoubleParams enum that identifies the parameter to set. |
[in] | modelRef | modelRef for the reference to set the parameter value for |
paramName | Meaning |
---|---|
REFERENCE_SCALE | Calculated scale, read only. |
REFERENCE_SCALE_STORED | Stored scale. |
REFERENCE_TRANSPARENCY | Transparency. |
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.
[out] | refFilePP | pointer to a pointer for the DgnPlatform::DgnAttachment structure pointer for the specified reference attachment |
[out] | modelRefP | pointer to the modelRef for the attached model |
[in] | srcModelRef | the modelRef that contains the attachment ID |
[in] | attachmentID | the unique element ID for the reference attachment element |
DgnAttachmentP mdlRefFile_getInfo | ( | DgnModelRefP | modelRef | ) |
Gets a the DgnAttachment structure for a modelRef.
[in] | modelRef | modelRef to get the ReferenceFile structure for. |
StatusInt mdlRefFile_getInt64Parameters | ( | UInt64 * | value, |
RefInt64Params | paramName, | ||
DgnModelRefP | modelRef | ||
) |
Gets int64 reference attachment settings.
[out] | value | the value of the specified setting. |
[in] | paramName | a member of the RefInt64 Params enum that identifies the parameter to get. |
[in] | modelRef | modelRef for the reference to set the parameter value for |
paramName | Meaning |
---|---|
REFERENCE_ELEMENTID | ElementID of the Attachment element. Read only. |
REFERENCE_SAVEDVIEWELEMENTID | ElementID of the Saved View element. Read only. |
StatusInt mdlRefFile_getIntegerParameters | ( | UInt32 * | value, |
RefIntegerParams | paramName, | ||
DgnModelRefP | modelRef | ||
) |
Gets integer reference attachment settings.
[out] | value | the value of the specified setting. |
[in] | paramName | a member of the RefIntegerParams enum that identifies the parameter to get. |
[in] | modelRef | modelRef for the reference to set the parameter value for |
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 |
bool mdlRefFile_getLocateLock | ( | DgnAttachmentP | refP | ) |
Gets the current setting of the Locate Lock for the specified reference.
[in] | refP | the DgnPlatform::DgnAttachment structure for the reference. |
DgnPlatform::DgnAttachmentLocateStatus mdlRefFile_getLocateStatus | ( | DgnAttachmentCP | refP | ) |
Gets information about the locate lock status for the specified reference.
[in] | refP | the DgnPlatform::DgnAttachment structure for the reference. |
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. |
DgnAttachmentCP mdlRefFile_getParent | ( | DgnAttachmentCP | refP | ) |
Gets the DgnAttachment structure for the parent of the specified attachment.
refP | IN the DgnAttachment structure for the reference. |
int mdlRefFile_getRefCount | ( | ) |
Gets the number of primary references that are attached to the currently active model.
StatusInt mdlRefFile_getRotMatrixParameters | ( | RotMatrixP | matrix, |
RefMatrixParams | paramName, | ||
DgnModelRefP | modelRef | ||
) |
Retrieves Rotation matrix reference attachment settings.
[out] | matrix | the new value of the specified setting. |
[in] | paramName | a member of the RefMatrixParams enum that identifies the parameter to set. |
[in] | modelRef | modelRef for the reference to set the parameter value for |
paramName | Meaning |
---|---|
REFERENCE_ROTATION | The reference rotation matix |
REFERENCE_CLIP_ROTMATRIX | The reference clip rotation matrix |
bool mdlRefFile_getSnapLock | ( | DgnAttachmentP | refP | ) |
Gets the current setting of the Snap Lock for the specified reference.
[in] | refP | the DgnPlatform::DgnAttachment structure for the reference. |
StatusInt mdlRefFile_getStringParameters | ( | WCharP | value, |
size_t | maxChars, | ||
RefStringParams | paramName, | ||
DgnModelRefP | modelRef | ||
) |
Gets string reference attachment settings.
[out] | value | the value of the specified setting. |
[in] | maxChars | the number of characters in the output value buffer. |
[in] | paramName | a member of the RefStringParams enum that identifies the parameter to set. |
[in] | modelRef | modelRef for the reference to set the parameter value for |
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 |
bool mdlRefFile_is3d | ( | DgnAttachmentCP | refP | ) |
Determines whether the specified reference is three dimensional.
[in] | refP | a pointer to the DgnPlatform::DgnAttachment structure for the reference. |
bool mdlRefFile_isPrimary | ( | DgnAttachmentCP | refP | ) |
Determines whether the specified reference is a primary reference (directly attached) for the currently active model.
[in] | refP | a pointer to the DgnPlatform::DgnAttachment structure for the reference. |
StatusInt mdlRefFile_reattach | ( | DgnModelRefP | modelRef, |
WCharP | outName, | ||
WCharCP | fileName, | ||
WCharCP | modelName | ||
) |
Changes the file or model to which the reference attachment refers.
[in] | modelRef | specifies the modelRef for the reference to be reattached. |
[out] | outName | the full file spec of the file reattached. Can be NULL. |
[in] | fileName | specifies the name of the new file for reference attachment. |
[in] | modelName | specifies the name of the new model within the fileName for reference. |
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. |
StatusInt mdlRefFile_reload | ( | DgnModelRefP | modelRef, |
bool | updateDisplay, | ||
bool | forceReload | ||
) |
Reloads the element data for the specified referenced model.
[in] | modelRef | modelRef for reference to reload. |
[in] | updateDisplay | true to update the screen after reload. |
[in] | forceReload | specifies whether the reload should happen regardless of whether the file containing the referenced data has changed. |
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. |
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.
[in] | modelRef | the reference to rotate |
[in] | pivotP | the point, in the active model coordinate system, to rotate about |
[in] | xRotation | the rotation angle about the X axis, in radians. |
[in] | yRotation | the rotation angle about the Y axis, in radians. |
[in] | zRotation | the rotation angle about the Z axis, in radians. |
[in] | view | the view in which the rotation is to be applied in 3D design files. This parameter is ignored in 2D design files. |
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.
[in] | modelRef | the reference to rotate |
[in] | pivotP | the point, in the active model coordinate system, to rotate about |
[in] | xRotation | the rotation angle about the X axis, in radians. |
[in] | yRotation | the rotation angle about the Y axis, in radians. |
[in] | zRotation | the rotation angle about the Z axis, in radians. |
[in] | view | the view in which the rotation is to be applied in 3D design files. This parameter is ignored in 2D design files. |
StatusInt mdlRefFile_scale | ( | DgnModelRefP | modelRef, |
Dpoint3d * | scalePointP, | ||
double | scale | ||
) |
Superseded by mdlRefFile_scaleAttachment.
It is maintained only for backwards compatibility.
[in] | modelRef | the reference to scale |
[in] | scalePointP | the point to scale about |
[in] | scale | the scale factor to apply. The current reference scale is multiplied by this factor. |
StatusInt mdlRefFile_scaleAttachment | ( | DgnModelRefP | modelRef, |
Dpoint3d * | scalePointP, | ||
double | scale | ||
) |
Scales a reference attachment.
[in] | modelRef | the reference to scale |
[in] | scalePointP | the point to scale about |
[in] | scale | the scale factor to apply. The current reference scale is multiplied by this factor. |
StatusInt mdlRefFile_setBooleanParameters | ( | bool | newValue, |
RefBooleanParams | paramName, | ||
DgnModelRefP | modelRef | ||
) |
Changes boolean reference attachment settings.
[in] | newValue | the new value of the specified setting. |
[in] | paramName | a member of the RefBooleanParams enum that identifies the parameter to set. |
[in] | modelRef | modelRef for the reference to set the parameter value for |
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 |
StatusInt mdlRefFile_setClip | ( | DgnModelRefP | modelRef, |
DPoint2dCP | pts, | ||
int | nverts | ||
) |
Sets a clip boundary for the specified reference.
[in] | modelRef | modelRef for reference to clip. |
[in] | pts | array of points specifying the vertices of the boundary |
[in] | nverts | number of vertices in the pts array. |
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. |
StatusInt mdlRefFile_setCoincidentWorldOrigin | ( | DgnModelRefP | modelRef | ) |
Sets the reference origins to appropriate values for attaching in "Coincident World" mode.
[in] | modelRef | model to be set coincident world origins for. |
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.
[in] | modelRef | the reference for which the color table is adjusted. |
[in] | valueAdjustment | the 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] | saturationAdjustment | the 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] | hueValue | if 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] | hsvFlags | any "or" combination of REFHSVADJUST_SATVAL_FIXED and REFHSVADJUST_HUE_FIXED. |
[in] | update | true if the reference should be immediately redrawn with the new color table adjustments |
StatusInt mdlRefFile_setDoubleParameters | ( | double | newValue, |
RefDoubleParams | paramName, | ||
DgnModelRefP | modelRef | ||
) |
Changes double-valued reference attachment settings.
[in] | newValue | the new value of the specified setting. |
[in] | paramName | a member of the RefDoubleParams enum that identifies the parameter to set. |
[in] | modelRef | modelRef for the reference to set the parameter value for |
paramName | Meaning |
---|---|
REFERENCE_SCALE | Calculated scale, read only. |
REFERENCE_SCALE_STORED | Stored scale. |
REFERENCE_TRANSPARENCY | Transparency. |
StatusInt mdlRefFile_setIntegerParameters | ( | UInt32 | newValue, |
RefIntegerParams | paramName, | ||
DgnModelRefP | modelRef | ||
) |
Changes integer reference attachment settings.
[in] | newValue | the new value of the specified setting. |
[in] | paramName | a member of the RefIntegerParams enum that identifies the parameter to set. |
[in] | modelRef | modelRef for the reference to set the parameter value for |
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 |
StatusInt mdlRefFile_setRotMatrixParameters | ( | RotMatrixCP | newMatrix, |
RefMatrixParams | paramName, | ||
DgnModelRefP | modelRef | ||
) |
Changes Rotation matrix reference attachment settings.
[in] | newMatrix | the new value of the specified setting. |
[in] | paramName | a member of the RefMatrixParams enum that identifies the parameter to set. |
[in] | modelRef | modelRef for the reference to set the parameter value for |
paramName | Meaning |
---|---|
REFERENCE_ROTATION | The reference rotation matix |
REFERENCE_CLIP_ROTMATRIX | The reference clip rotation matrix |
StatusInt mdlRefFile_setStringParameters | ( | WCharCP | newValue, |
RefStringParams | paramName, | ||
DgnModelRefP | modelRef | ||
) |
Changes string reference attachment settings.
[in] | newValue | the new value of the specified setting. |
[in] | paramName | a member of the RefStringParams enum that identifies the parameter to set. |
[in] | modelRef | modelRef for the reference to set the parameter value for |
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 |
int mdlRefFile_transformAttachment | ( | DgnModelRefP | modelRef, |
TransformP | transform, | ||
bool | applyToClipElement | ||
) |
Transforms the reference attachment.
[in] | modelRef | specifies the modelRef for the reference to be transformed. |
[in] | transform | specifies the transform to apply to the reference. |
[in] | applyToClipElement | if true, applies the transform to the clip element for the reference, if clipped by element. |
StatusInt mdlRefFile_updateReference | ( | DgnModelRefP | modelRef, |
DgnPlatform::DgnDrawMode | displayMode | ||
) |
Updates the reference file in all views.
[in] | modelRef | modelRef for reference to update |
[in] | displayMode | one of the display modes defined in mdl.h. Most commonly used are DRAW_MODE_Normal, ERASE, and HILITE. |
StatusInt mdlRefFile_writeAttachment | ( | DgnModelRefP | modelRef | ) |
Writes the current attachment information for the specifed reference to its parent model.
[in] | modelRef | modelRef for reference to write. |
Value | Description |
---|---|
MDLERR_BADMODELREF | modelRef is not a valid reference modelRef. |
MDLERR_NOTDIRECTATTACHMENT | modelRef refers to a nested reference. |
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.
[in] | modelRef | modelRef for reference to write. |
Value | Description |
---|---|
MDLERR_BADMODELREF | modelRef is not a valid reference modelRef. |
MDLERR_NOTDIRECTATTACHMENT | modelRef refers to a nested reference. |
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.
[in] | modelRef | modelRef for reference to write. |
[in] | writeParams | if true, writes all reference parameters (e.g., display, scale, rotation, position) except level display masks. |
[in] | writeLevels | if true, writes the level display masks. |
[in] | writeImmediately | this 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. |
Value | Description |
---|---|
MDLERR_BADMODELREF | modelRef is not a valid reference modelRef. |
MDLERR_NOTDIRECTATTACHMENT | modelRef refers to a nested reference. |