Functions
Model Properties

Functions

StatusInt mdlModelRef_getRange (DgnModelRefP modelRef, DRange3dP pRange, int viewIndex, TransformP transformP, bool includeChildren)
 Gets the range for the specified modelRef. More...
 
DgnPlatform::ModelId mdlModelRef_getModelID (DgnModelRefP modelRef)
 Gets the DgnPlatform::ModelId of a model. More...
 
StatusInt mdlModelRef_getModelName (DgnModelRefP modelRef, WCharP nameP)
 Gets the name of a model. More...
 
StatusInt mdlModelRef_setModelName (DgnModelRefP modelRef, const WChar *nameP)
 Sets the name of a model. More...
 
StatusInt mdlModelRef_getModelDescription (DgnModelRefP modelRef, WChar *pDescr)
 Gets the description of a model. More...
 
StatusInt mdlModelRef_setModelDescription (DgnModelRefP modelRef, const WChar *pDefaultRefLogical)
 Sets the default reference logical name for a model. More...
 
StatusInt mdlModelRef_setModelDefaultRefLogical (DgnModelRefP modelRef, const WChar *pDescr)
 Sets the description of a model. More...
 
StatusInt mdlModelRef_setModelType (DgnModelRefP modelRef, DgnPlatform::DgnModelType type)
 Sets the type of a model. More...
 
StatusInt mdlModelRef_setModelFlag (DgnModelRefP modelRef, int flagNum, int value)
 Sets various flags of a model. More...
 
double mdlModelRef_getUorPerMaster (DgnModelRefP modelRef)
 Gets the number of uors per master unit for a model. More...
 
double mdlModelRef_getUorPerSub (DgnModelRefP modelRef)
 Gets the number of uors per sub unit for a model. More...
 
double mdlModelRef_getSubPerMaster (DgnModelRefP modelRef)
 Gets the number of sub units per master unit for a model. More...
 
double mdlModelRef_getUorPerStorage (DgnModelRefP modelRef)
 Gets the number of uors per storage unit for a model. More...
 
double mdlModelRef_getUorPerMeter (DgnModelRefP modelRef)
 Gets the number of UORs per meter for a given model ref. More...
 
StatusInt mdlModelRef_getMasterUnit (DgnModelRefP modelRef, DgnPlatform::UnitInfo *pUnitInfo)
 Gets the master unit definition of a model. More...
 
StatusInt mdlModelRef_getSubUnit (DgnModelRefP modelRef, DgnPlatform::UnitInfo *pUnitInfo)
 Gets the sub unit definition of a model. More...
 
StatusInt mdlModelRef_getSubUnitLabel (DgnModelRefP modelRef, WCharP pLabel)
 Gets the sub unit label of a model. More...
 
StatusInt mdlModelRef_getMasterUnitLabel (DgnModelRefP modelRef, WCharP pLabel)
 Gets the master unit label of a model. More...
 
StatusInt mdlModelRef_getStorageUnit (DgnModelRefP modelRef, DgnPlatform::UnitInfo *pUnitInfo)
 Gets the storage unit definition of a model. More...
 
StatusInt mdlModelRef_setWorkingUnits (DgnModelRefP modelRef, const DgnPlatform::UnitInfo *pNewMasterUnit, const DgnPlatform::UnitInfo *pNewSubUnit)
 Sets the working units of a model, including the definition for both the master and the sub unit. More...
 
StatusInt mdlModelRef_setStorageUnits (DgnModelRefP modelRef, const DgnPlatform::UnitInfo *pNewStorageUnit, double *pNewUorPerStorage)
 Sets the storage unit definition of a model. More...
 
StatusInt mdlModelRef_setMasterUnitLabel (DgnModelRefP modelRef, const WChar *pLabel)
 Sets the master unit label of a model. More...
 
StatusInt mdlModelRef_setSubUnitLabel (DgnModelRefP modelRef, WCharCP pLabel)
 Sets the sub unit label of a model. More...
 
StatusInt mdlModelRef_getGlobalOrigin (DgnModelRefP modelRef, DPoint3dP pGlobalOrigin)
 Gets the global origin of a model. More...
 
StatusInt mdlModelRef_setGlobalOrigin (DgnModelRefP modelRef, DPoint3dCP pGlobalOrigin)
 Sets the global origin of a model. More...
 
StatusInt mdlModelRef_getAzimuth (DgnModelRefP modelRef, double *pAzimuth)
 Gets the azimuthal angle (the angle between the Y axis and true north) of the model in degrees. More...
 
StatusInt mdlModelRef_setAzimuth (DgnModelRefP modelRef, double azimuth)
 Sets the azimuthal angle (the angle between the Y axis and true north) of the model in degrees. More...
 
StatusInt mdlModelRef_getAuxCoordinateSystem (DgnModelRefP modelRef, Dpoint3d *pOrigin, RotMatrixP pRotMatrix, DgnPlatform::ACSType *pType, DgnPlatform::ElementId *pElementId)
 Gets the definition of the active auxiliary coordinate system of a model. More...
 
StatusInt mdlModelRef_getAuxCoordinateSystem2 (DgnModelRefP modelRef, Dpoint3d *pOrigin, RotMatrixP pRotMatrix, double *pScale, DgnPlatform::ACSType *pType, DgnPlatform::ElementId *pElementId)
 Get the active ACS for a model. More...
 
StatusInt mdlModelRef_setAuxCoordinateSystem (DgnModelRefP modelRef, const Dpoint3d *pOrigin, RotMatrixCP pRotMatrix, const DgnPlatform::ACSType *pType, const DgnPlatform::ElementId *pElementId)
 Sets the definition of the active auxiliary coordinate system of a model. More...
 
StatusInt mdlModelRef_setAuxCoordinateSystem2 (DgnModelRefP modelRef, const Dpoint3d *pOrigin, RotMatrixCP pRotMatrix, const double *pScale, const DgnPlatform::ACSType *pType, const DgnPlatform::ElementId *pElementId)
 Set the active ACS for a model. More...
 
StatusInt mdlModelRef_setGridParams (DgnModelRefP modelRef, const double *pUorPerGrid, const UInt32 *pGridPerRefernce, const double *pGridRatio, const DPoint2d *pGridBase, const double *pGridAngle)
 Sets the grid parameters of a model. More...
 
StatusInt mdlModelRef_setRoundoffUnit (DgnModelRefP modelRef, const double *pRoundoffUnit, const double *pRoundOffRatio)
 Sets the roundoff unit of a model. More...
 
bool mdlModel_nameCharIsValid (const WChar modelNameChar)
 Tests if the supplied character is valid for a model name. More...
 
bool mdlModel_nameIsValid (const WChar *modelName)
 Tests if the supplied string is a valid model name. More...
 
StatusInt mdlModelRef_setCellType (DgnModelRefP modelRef, DgnPlatform::CellLibraryType cellType)
 Set the cell type of a model. More...
 
StatusInt mdlModelRef_setSheetDef (DgnModelRefP modelRefIn, SheetDefCP sheetDefIn)
 For a modelref, set its sheet definition. More...
 
StatusInt mdlSheetDef_initialize (SheetDefP sheetDefIn)
 Initialize new sheet definition structure. More...
 
SheetDefP mdlSheetDef_new ()
 Allocate a new sheet definition structure. More...
 
StatusInt mdlSheetDef_free (SheetDefP *sheetDef)
 Free a sheet definition structure. More...
 
StatusInt mdlSheetDef_copy (SheetDefP destSheetDefOut, SheetDefCP sourceSheetDefIn)
 Copy sheet defintion information from source to destination. More...
 
bool mdlSheetDef_compareData (BitMaskP compareBitMaskOut, SheetDefCP sheetDef1In, SheetDefCP sheetDef2In, BitMaskCP compareAttributesMaskIn)
 Compare if sheet related data between two sheet defs. More...
 
bool mdlSheetDef_isEnabled (SheetDefCP sheetDefIn)
 For a sheet definition, check if the sheet related information is enabled. More...
 
StatusInt mdlSheetDef_enable (SheetDefP sheetDefIn, bool isEnabledIn)
 For a sheet definition, set if the sheet related information is to be enabled. More...
 
StatusInt mdlSheetDef_getOrigin (SheetDefCP sheetDefIn, DPoint2d *sheetOriginOut)
 For a sheet definition, get origin - the lower left hand corner of the sheet relative to the sheet model's origin. More...
 
StatusInt mdlSheetDef_setOrigin (SheetDefP sheetDefIn, DPoint2d const *sheetOriginIn)
 For a sheet definition, set its origin - the lower left hand corner of the sheet relative to the sheet model's origin. More...
 
StatusInt mdlSheetDef_getRotation (SheetDefCP sheetDefIn, double *sheetRotationOut)
 For a sheet definition, get rotation - relative to the X axis of the sheet model in the XY plane. More...
 
StatusInt mdlSheetDef_setRotation (SheetDefP sheetDefIn, double sheetRotationIn)
 For a sheet definition, set rotation - relative to the X axis of the sheet model in the XY plane. More...
 
StatusInt mdlSheetDef_getSize (SheetDefCP sheetDefIn, double *sheetWidthOut, double *sheetHeightOut)
 For a sheet definition, get sheet size. More...
 
StatusInt mdlSheetDef_setSize (SheetDefP sheetDefIn, double sheetWidthIn, double sheetHeightIn)
 For a sheet definition, set size. More...
 
StatusInt mdlSheetDef_getFormName (SheetDefCP sheetDefIn, WStringR formNameOut)
 For a sheet definition, get its form name - this is a name associated with its size. More...
 
StatusInt mdlSheetDef_setFormName (SheetDefP sheetDefIn, WChar const *formNameIn)
 For a sheet definition, set its form name - this is a name associated with its size. More...
 
StatusInt mdlSheetDef_getColor (SheetDefCP sheetDefIn, UInt32 *sheetColorOut)
 For a sheet definition, get color. More...
 
StatusInt mdlSheetDef_setColor (SheetDefP sheetDefIn, UInt32 sheetColorIn)
 For a sheet definition, set color. More...
 
StatusInt mdlSheetDef_getUnits (SheetDefCP sheetDefIn, DgnPlatform::UnitInfo *unitInfoOut)
 For a sheet definition, get its units. More...
 
StatusInt mdlSheetDef_setUnits (SheetDefP sheetDefIn, DgnPlatform::UnitInfo const *unitInfoIn)
 For a sheet definition, set its units. More...
 
StatusInt mdlSheetDef_getPaperMargins (SheetDefCP sheetDefIn, double *topMarginOut, double *leftMarginOut, double *bottomMarginOut, double *rightMarginOut)
 For a sheet definition, get its margins. More...
 
StatusInt mdlSheetDef_setPaperMargins (SheetDefP sheetDefIn, double topMarginIn, double leftMarginIn, double bottomMarginIn, double rightMarginIn)
 For a sheet definition, set its margins. More...
 
StatusInt mdlSheetDef_getPlotStyleTableFileName (SheetDefCP sheetDefIn, WStringR pstFileNameOut)
 For a sheet definition, get the plot style table file name. More...
 
StatusInt mdlSheetDef_setPlotStyleTableFileName (SheetDefP sheetDefIn, WChar const *pstFileNameIn)
 For a sheet definition, set the plot style table file name. More...
 
StatusInt mdlSheetDef_getPrintStyleName (SheetDefCP sheetDefIn, WStringR printStyleNameOut)
 For a sheet definition, get the print style name. More...
 
StatusInt mdlSheetDef_setPrintStyleName (SheetDefP sheetDefIn, WChar const *printStyleNameIn)
 For a sheet definition, set the print style name. More...
 
StatusInt mdlSheetDef_getSheetNumber (SheetDefCP sheetDefIn, UInt32 *sheetNumberOut)
 For a sheet definition, get the sheet number. More...
 
StatusInt mdlSheetDef_setSheetNumber (SheetDefP sheetDefIn, UInt32 sheetNumberIn)
 For a sheet definition, set sheet number. More...
 
StatusInt mdlSheetDef_getBorderAttachmentId (SheetDefCP sheetDefIn, UInt64 *borderAttachmentIdOut)
 For a sheet definition, get its border attachment id (if any). More...
 
StatusInt mdlSheetDef_setBorderAttachmentId (SheetDefP sheetDefIn, UInt64 borderAttachmentIdIn)
 For a sheet definition, set its border attachment id. More...
 

Detailed Description

Function Documentation

bool mdlModel_nameCharIsValid ( const WChar  modelNameChar)

Tests if the supplied character is valid for a model name.

Parameters
[in]modelNameCharthe character to test.
Returns
true if the character is valid, false otherwise.
See also
mdlModel_nameIsValid
bool mdlModel_nameIsValid ( const WChar *  modelName)

Tests if the supplied string is a valid model name.

The test includes checking each character and also checking for all spaces.

Parameters
[in]modelNamethe name to test.
Returns
true if the name is valid, false otherwise.
Remarks
This function does not test if a model already exists with the specified name.
See also
mdlModel_nameCharIsValid
StatusInt mdlModelRef_getAuxCoordinateSystem ( DgnModelRefP  modelRef,
Dpoint3d pOrigin,
RotMatrixP  pRotMatrix,
DgnPlatform::ACSType *  pType,
DgnPlatform::ElementId *  pElementId 
)

Gets the definition of the active auxiliary coordinate system of a model.

Parameters
[in]modelRefget the property of the model referenced by this.
[out]pOriginorigin of the acs.
[out]pRotMatrixrotation of the acs.
[out]pTypetype of the acs, ex. ACS_TYPE_RECT.
[out]pElementIdif a named acs is active the id of the element, else 0
Returns
SUCCESS if the ACS was returned successfully, otherwise ERROR
See also
mdlModelRef_setAuxCoordinateSystem
StatusInt mdlModelRef_getAuxCoordinateSystem2 ( DgnModelRefP  modelRef,
Dpoint3d pOrigin,
RotMatrixP  pRotMatrix,
double *  pScale,
DgnPlatform::ACSType *  pType,
DgnPlatform::ElementId *  pElementId 
)

Get the active ACS for a model.

Parameters
[in]modelRefmodelRef
[out]pOriginorigin of aux coord sys
[out]pRotMatrixrotation of aux coord sys
[out]pScalescale of aux coord sys
[out]pTypetype of aux coord sys ex. ACS_TYPE_RECT
[out]pElementIdid of named acs element (if any)
Returns
status
StatusInt mdlModelRef_getAzimuth ( DgnModelRefP  modelRef,
double *  pAzimuth 
)

Gets the azimuthal angle (the angle between the Y axis and true north) of the model in degrees.

Parameters
[in]modelRefget the property of the model referenced by this.
[out]pAzimuththe azimuth location - in degrees.
Returns
SUCCESS if the azimuth was returned successfully, otherwise ERROR
See also
mdlModelRef_setAzimuth
StatusInt mdlModelRef_getGlobalOrigin ( DgnModelRefP  modelRef,
DPoint3dP  pGlobalOrigin 
)

Gets the global origin of a model.

Parameters
[in]modelRefget the property of the model referenced by this.
[out]pGlobalOriginthe global origin location - in UORs.
Returns
SUCCESS if the global origin was returned successfully, otherwise ERROR
See also
mdlModelRef_setGlobalOrigin
StatusInt mdlModelRef_getMasterUnit ( DgnModelRefP  modelRef,
DgnPlatform::UnitInfo *  pUnitInfo 
)

Gets the master unit definition of a model.

Parameters
[in]modelRefthe model to get the master unit definition from.
[out]pUnitInfothe master unit definition
Returns
SUCCESS if the master unit definition was retrieved successfully, otherwise ERROR.
See also
mdlModelRef_setWorkingUnits
StatusInt mdlModelRef_getMasterUnitLabel ( DgnModelRefP  modelRef,
WCharP  pLabel 
)

Gets the master unit label of a model.

Parameters
[in]modelRefget the property of the model referenced by this.
[out]pLabelthe master unit label string
Returns
SUCCESS if the master unit label was retrieved successfully, otherwise ERROR.
See also
mdlModelRef_setMasterUnitLabel
StatusInt mdlModelRef_getModelDescription ( DgnModelRefP  modelRef,
WChar *  pDescr 
)

Gets the description of a model.

Parameters
[in]modelRefget the property of the model referenced by this.
[out]pDescrthe description string for the model.
Returns
SUCCESS if the description string could be retrieved, otherwise ERROR
See also
mdlModelRef_setModelDescription
DgnPlatform::ModelId mdlModelRef_getModelID ( DgnModelRefP  modelRef)

Gets the DgnPlatform::ModelId of a model.

Parameters
[in]modelRefget the property of the model referenced by this.
Returns
the DgnPlatform::ModelId for the specified model, or -1 if the modelRef is invalid.
See also
mdlModelRef_getDgnModel
StatusInt mdlModelRef_getModelName ( DgnModelRefP  modelRef,
WCharP  nameP 
)

Gets the name of a model.

Parameters
[in]modelRefget the property of the model referenced by this.
[out]namePthe name of the model
Returns
SUCCESS if the name could be retrieved successfully
See also
mdlModelRef_setModelName
StatusInt mdlModelRef_getRange ( DgnModelRefP  modelRef,
DRange3dP  pRange,
int  viewIndex,
TransformP  transformP,
bool  includeChildren 
)

Gets the range for the specified modelRef.

This calculates the range for all geometry in a model - it does not ignore elements that are not displayed in the input view. This function is relatively fast. It does not iterate through the model but uses a range that is stored internally.

Parameters
[in]modelRefthe model to get the range for.
[out]pRangethe model range
[in]viewIndexindex of view, used to get the clip volume of the view.
[in]transformPNULL or transform to apply before calculating range.
[in]includeChildrentrue to include the range of child references.
Returns
SUCCESS if the requested params were acceptable, otherwise ERROR
StatusInt mdlModelRef_getStorageUnit ( DgnModelRefP  modelRef,
DgnPlatform::UnitInfo *  pUnitInfo 
)

Gets the storage unit definition of a model.

Parameters
[in]modelRefget the property of the model referenced by this.
[out]pUnitInfois the definition of the storage unit.
Returns
SUCCESS unless the model reference was invalid, then ERROR
See also
mdlModelRef_setStorageUnits
double mdlModelRef_getSubPerMaster ( DgnModelRefP  modelRef)

Gets the number of sub units per master unit for a model.

Parameters
[in]modelRefget the property of the model referenced by this.
Returns
the number of sub units in one master unit.
Remarks
This is a derived quantity, so there is no corresponding set function.
See also
mdlModelRef_getSubUnit mdlModelRef_getMasterUnit mdlModelRef_setWorkingUnits
StatusInt mdlModelRef_getSubUnit ( DgnModelRefP  modelRef,
DgnPlatform::UnitInfo *  pUnitInfo 
)

Gets the sub unit definition of a model.

Parameters
[in]modelRefget the property of the model referenced by this.
[out]pUnitInfounit definition
Returns
SUCCESS if the sub unit definition was retrieved successfully, otherwise ERROR.
See also
mdlModelRef_setWorkingUnits
StatusInt mdlModelRef_getSubUnitLabel ( DgnModelRefP  modelRef,
WCharP  pLabel 
)

Gets the sub unit label of a model.

Parameters
[in]modelRefget the property of the model referenced by this.
[out]pLabelthe sub unit label string.
Returns
SUCCESS if the sub unit label string was retrieved successfully.
See also
mdlModelRef_setSubUnitLabel
double mdlModelRef_getUorPerMaster ( DgnModelRefP  modelRef)

Gets the number of uors per master unit for a model.

Parameters
[in]modelRefget the property of the model referenced by this.
Returns
the number of uors per master unit.
Remarks
This is a derived quantity, so there is no corresponding set function.
See also
mdlModelRef_setWorkingUnits mdlModelRef_setStorageUnits
double mdlModelRef_getUorPerMeter ( DgnModelRefP  modelRef)

Gets the number of UORs per meter for a given model ref.

Parameters
[in]modelRefget the property of the model referenced by this.
Returns
the number of UORs per meter for a given model ref.
double mdlModelRef_getUorPerStorage ( DgnModelRefP  modelRef)

Gets the number of uors per storage unit for a model.

Parameters
[in]modelRefget the property of the model referenced by this.
Returns
the number of uors in one storage unit.
See also
mdlModelRef_setStorageUnits
double mdlModelRef_getUorPerSub ( DgnModelRefP  modelRef)

Gets the number of uors per sub unit for a model.

Parameters
[in]modelRefget the property of the model referenced by this.
Returns
the number of uors per sub unit.
Remarks
This is a derived quantity, so there is no corresponding set function.
See also
mdlModelRef_setWorkingUnits mdlModelRef_setStorageUnits
StatusInt mdlModelRef_setAuxCoordinateSystem ( DgnModelRefP  modelRef,
const Dpoint3d pOrigin,
RotMatrixCP  pRotMatrix,
const DgnPlatform::ACSType *  pType,
const DgnPlatform::ElementId *  pElementId 
)

Sets the definition of the active auxiliary coordinate system of a model.

Parameters
[in]modelRefset the property of the model referenced by this.
[in]pOriginorigin of the acs, NULL for no change.
[in]pRotMatrixrotation of the acs, NULL for no change.
[in]pTypetype of the acs, ex. ACS_TYPE_RECT, NULL for no change.
[in]pElementIdid of named acs element, NULL sets id to 0
Returns
SUCCESS if the acs was set successfully, otherwise ERROR.
See also
mdlModelRef_getAuxCoordinateSystem
StatusInt mdlModelRef_setAuxCoordinateSystem2 ( DgnModelRefP  modelRef,
const Dpoint3d pOrigin,
RotMatrixCP  pRotMatrix,
const double *  pScale,
const DgnPlatform::ACSType *  pType,
const DgnPlatform::ElementId *  pElementId 
)

Set the active ACS for a model.

Parameters
[in]modelRefmodelRef
[in]pOriginorigin of aux coord sys
[in]pRotMatrixrotation of aux coord sys
[in]pScalescale of aux coord sys
[in]pTypetype of aux coord sys ex. ACS_TYPE_RECT
[in]pElementIdid of named acs element, NULL sets id to 0
Returns
status
StatusInt mdlModelRef_setAzimuth ( DgnModelRefP  modelRef,
double  azimuth 
)

Sets the azimuthal angle (the angle between the Y axis and true north) of the model in degrees.

Parameters
[in]modelRefset the property of the model referenced by this.
[in]azimuththe azimuthal angle (the angle between the Y axis and true north) in degrees.
Returns
SUCCESS if the azimuth was set successfully, otherwise ERROR.
See also
mdlModelRef_getAzimuth
StatusInt mdlModelRef_setCellType ( DgnModelRefP  modelRef,
DgnPlatform::CellLibraryType  cellType 
)

Set the cell type of a model.

This is only used when the model is placed as a cell.

Parameters
[in]modelRefModel to set data in.
[in]cellTypeThe cell type of the model. Possible values are CellLibraryTypes::Graphic, CellLibraryTypes::Point, defined in msdefs.h.
Returns
SUCCESS if the cell type was set successfully, otherwise ERROR.
See also
mdlModelRef_getCellType
StatusInt mdlModelRef_setGlobalOrigin ( DgnModelRefP  modelRef,
DPoint3dCP  pGlobalOrigin 
)

Sets the global origin of a model.

Parameters
[in]modelRefset the property of the model referenced by this.
[in]pGlobalOriginthe global origin to set - in UORs
Returns
SUCCESS if the global origin was set successfully, otherwise ERROR.
See also
mdlModelRef_getGlobalOrigin
StatusInt mdlModelRef_setGridParams ( DgnModelRefP  modelRef,
const double *  pUorPerGrid,
const UInt32 pGridPerRefernce,
const double *  pGridRatio,
const DPoint2d *  pGridBase,
const double *  pGridAngle 
)

Sets the grid parameters of a model.

Parameters
[in]modelRefset the property of the model referenced by this.
[in]pUorPerGridthe number of uors per grid, NULL if not changing.
[in]pGridPerReferncethe number of grids per ref grid, NULL if not changing.
[in]pGridRatiothe ratio of grid spacing y / x, NULL if not changing.
[in]pGridBasegrid base offset, NULL if not changing.
[in]pGridAnglegrid rotation angle, NULL if not changing.
Returns
SUCCESS if the acs was set successfully, otherwise ERROR.
See also
mdlModelRef_getGridParams
StatusInt mdlModelRef_setMasterUnitLabel ( DgnModelRefP  modelRef,
const WChar *  pLabel 
)

Sets the master unit label of a model.

Parameters
[in]modelRefset the property of the model referenced by this.
[in]pLabelthe master unit label string to set.
Returns
SUCCESS if the master unit label was set successfully, otherwise ERROR.
See also
mdlModelRef_getMasterUnitLabel
StatusInt mdlModelRef_setModelDefaultRefLogical ( DgnModelRefP  modelRef,
const WChar *  pDescr 
)

Sets the description of a model.

Parameters
[in]modelRefset the property of the model referenced by this.
[in]pDescrthe default reference logical string to assign to the model.
Returns
SUCCESS if the default reference logical string could be set, otherwise ERROR
See also
mdlModelRef_getModelDefaultRefLogical
StatusInt mdlModelRef_setModelDescription ( DgnModelRefP  modelRef,
const WChar *  pDefaultRefLogical 
)

Sets the default reference logical name for a model.

Parameters
[in]modelRefset the property of the model referenced by this.
[in]pDefaultRefLogicalthe default reference logical name when this model is referenced.
Returns
SUCCESS if the default reference logical string could be set, otherwise ERROR
See also
mdlModelRef_getModelDefaultRefLogical
StatusInt mdlModelRef_setModelFlag ( DgnModelRefP  modelRef,
int  flagNum,
int  value 
)

Sets various flags of a model.

Property flags will be saved to the model immediately, while settings flags will be saved the next time the settings are saved for this model. The flags are defined in mdl.h.

Properties Flags
MODELFLAG_NOT_IN_CELL_LIST Set the model so it does not appear in the cell list if this file is attached as a cell library.
MODELFLAG_NOT_IN_MODEL_LIST Set the model so it does not appear in the model list in the models dialog.
MODELFLAG_LSSCALE_IS_ANNSCALE
MODELFLAG_IS_ANNOTATION_CELL

Settings Flags
MODELFLAG_UNIT_LOCK
MODELFLAG_GRID_LOCK
MODELFLAG_ISO_GRID
MODELFLAG_ISO_LOCK
MODELFLAG_ISO_PLANE
MODELFLAG_USE_ANNOTATION_SCALE
MODELFLAG_ACS_LOCK

Parameters
[in]modelRefset the property of the model referenced by this.
[in]flagNumthe flag to set the value of.
[in]valuethe value to set, True or false for all except MODELFLAG_ISO_PLANE, which requires one of the IsoPlaneValues.
Returns
SUCCESS if the flag value was set successfully, otherwise ERROR.
See also
mdlModelRef_getModelFlag
StatusInt mdlModelRef_setModelName ( DgnModelRefP  modelRef,
const WChar *  nameP 
)

Sets the name of a model.

Parameters
[in]modelRefset the property of the model referenced by this.
[in]namePthe name to assign to the model.
Returns
SUCCESS if the name was changed successfully, otherwise ERROR
See also
mdlModelRef_getModelName
StatusInt mdlModelRef_setModelType ( DgnModelRefP  modelRef,
DgnPlatform::DgnModelType  type 
)

Sets the type of a model.

Valid Model Types
DgnModelType::Normal
DgnModelType::Sheet

Parameters
[in]modelRefset the property of the model referenced by this.
[in]typethe type value for the model. Valid values are DgnModelType::Sheet and DgnModelType::Normal.
Returns
SUCCESS if the model type could be set, otherwise ERROR
See also
mdlModelRef_getModelType
StatusInt mdlModelRef_setRoundoffUnit ( DgnModelRefP  modelRef,
const double *  pRoundoffUnit,
const double *  pRoundOffRatio 
)

Sets the roundoff unit of a model.

Parameters
[in]modelRefset the property of the model referenced by this.
[in]pRoundoffUnitthe value of the roundoff unit.
[in]pRoundOffRatiothe ratio of round off units y / x (NULL to use grid ratio)
Returns
SUCCESS if the param was set successfully, otherwise ERROR.
See also
mdlModelRef_getRoundoffUnit
StatusInt mdlModelRef_setSheetDef ( DgnModelRefP  modelRefIn,
SheetDefCP  sheetDefIn 
)

For a modelref, set its sheet definition.

Parameters
[in]modelRefInsheet model
[in]sheetDefInsheet definition
Returns
SUCCESS if the sheet definition can be set, else ERROR
StatusInt mdlModelRef_setStorageUnits ( DgnModelRefP  modelRef,
const DgnPlatform::UnitInfo *  pNewStorageUnit,
double *  pNewUorPerStorage 
)

Sets the storage unit definition of a model.

Parameters
[in]modelRefset the property of the model referenced by this.
[in]pNewStorageUnitthe definition of the storage unit. Pass NULL for no change.
[in]pNewUorPerStoragethe number of positional units per storage unit. Pass NULL for no change.
Returns
SUCCESS if the operation is completed successfully, otherwise ERROR
Remarks
The storage unit defines the relationship between uors and a universal base unit (usually meters).
See also
mdlModelRef_getStorageUnit mdlModelRef_getUorPerStorage
StatusInt mdlModelRef_setSubUnitLabel ( DgnModelRefP  modelRef,
WCharCP  pLabel 
)

Sets the sub unit label of a model.

Parameters
[in]modelRefset the property of the model referenced by this.
[in]pLabelthe sub unit label string to set.
Returns
SUCCESS if the sub unit label was set successfully, otherwise ERROR
See also
mdlModelRef_getSubUnitLabel
StatusInt mdlModelRef_setWorkingUnits ( DgnModelRefP  modelRef,
const DgnPlatform::UnitInfo *  pNewMasterUnit,
const DgnPlatform::UnitInfo *  pNewSubUnit 
)

Sets the working units of a model, including the definition for both the master and the sub unit.

The new master and sub units must have the same base as the model's storage unit.

Parameters
[in]modelRefset the property of the model referenced by this.
[in]pNewMasterUnitthe master unit definition to set.
[in]pNewSubUnitthe sub unit definition to set
Returns
SUCCESS if the unit definitions were set successfully.
See also
mdlModelRef_getMasterUnit mdlModelRef_getSubUnit
bool mdlSheetDef_compareData ( BitMaskP  compareBitMaskOut,
SheetDefCP  sheetDef1In,
SheetDefCP  sheetDef2In,
BitMaskCP  compareAttributesMaskIn 
)

Compare if sheet related data between two sheet defs.

The function will compare only those attributes as specified in compareAttributesMaskIn If compareAttributesMaskIn is NULL, then all the attributes will be compared.

Parameters
[out]compareBitMaskOutif non-null, then return a set of bits that represent the attributes that are not the same.
[in]sheetDef1Insheet definition 1
[in]sheetDef2Insheet definition 2
[in]compareAttributesMaskInmask of attributes to compare
Returns
true if the sheet data of the two sheet defs matches for attributes specified in compareAttributesMaskIn
Remarks
Required Library: mdlbltin.lib
StatusInt mdlSheetDef_copy ( SheetDefP  destSheetDefOut,
SheetDefCP  sourceSheetDefIn 
)

Copy sheet defintion information from source to destination.

Parameters
[out]destSheetDefOutdestination sheet definition
[in]sourceSheetDefInsource sheet definition
Returns
SUCCESS if the copy is successful, else ERROR
Remarks
Required Library: mdlbltin.lib
StatusInt mdlSheetDef_enable ( SheetDefP  sheetDefIn,
bool  isEnabledIn 
)

For a sheet definition, set if the sheet related information is to be enabled.

Parameters
[in]sheetDefInsheet definition
[in]isEnabledIntrue if the sheet related information is to be enabled.
Returns
SUCCESS if the sheet enable flag is set successfully
Remarks
Required Library: mdlbltin.lib
StatusInt mdlSheetDef_free ( SheetDefP *  sheetDef)

Free a sheet definition structure.

Parameters
[in]sheetDefsheet def structure to free
Returns
SUCCESS if structure is free, else ERROR.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlSheetDef_getBorderAttachmentId ( SheetDefCP  sheetDefIn,
UInt64 borderAttachmentIdOut 
)

For a sheet definition, get its border attachment id (if any).

Parameters
[in]sheetDefInsheet definition
[out]borderAttachmentIdOutsheet border attachment id
Returns
SUCCESS if the sheet border attachment id is successfully returned
Remarks
Required Library: mdlbltin.lib
StatusInt mdlSheetDef_getColor ( SheetDefCP  sheetDefIn,
UInt32 sheetColorOut 
)

For a sheet definition, get color.

Parameters
[in]sheetDefInsheet definition
[out]sheetColorOutsheet color
Returns
SUCCESS if the sheet color is obtained successfully, else ERROR.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlSheetDef_getFormName ( SheetDefCP  sheetDefIn,
WStringR  formNameOut 
)

For a sheet definition, get its form name - this is a name associated with its size.

Parameters
[in]sheetDefInsheet definition
[in]formNameOutsheet form name
Returns
SUCCESS if the sheet form name is got successfully, else ERROR.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlSheetDef_getOrigin ( SheetDefCP  sheetDefIn,
DPoint2d *  sheetOriginOut 
)

For a sheet definition, get origin - the lower left hand corner of the sheet relative to the sheet model's origin.

Parameters
[in]sheetDefInsheet definition
[out]sheetOriginOutsheet origin
Returns
SUCCESS if the sheet origin is obtained successfully, else ERROR.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlSheetDef_getPaperMargins ( SheetDefCP  sheetDefIn,
double *  topMarginOut,
double *  leftMarginOut,
double *  bottomMarginOut,
double *  rightMarginOut 
)

For a sheet definition, get its margins.

Remarks
The SheetDef size and origin specifies the printable area. The total sheet size is the sum of the SheetDef size plus margins.
Parameters
[in]sheetDefInsheet definition
[out]topMarginOuttop paper margin
[out]leftMarginOutleft paper margin
[out]bottomMarginOutbottom paper margin
[out]rightMarginOutright paper margin
Returns
SUCCESS if the margins are got successfully, else ERROR.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlSheetDef_getPlotStyleTableFileName ( SheetDefCP  sheetDefIn,
WStringR  pstFileNameOut 
)

For a sheet definition, get the plot style table file name.

Parameters
[in]sheetDefInsheet definition
[out]pstFileNameOutplot style table file name string
Returns
SUCCESS if the plot style file name is obtained successfully, else ERROR.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlSheetDef_getPrintStyleName ( SheetDefCP  sheetDefIn,
WStringR  printStyleNameOut 
)

For a sheet definition, get the print style name.

Parameters
[in]sheetDefInsheet definition
[out]printStyleNameOutprint style name string
Returns
SUCCESS if the print style name is obtained successfully, else ERROR.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlSheetDef_getRotation ( SheetDefCP  sheetDefIn,
double *  sheetRotationOut 
)

For a sheet definition, get rotation - relative to the X axis of the sheet model in the XY plane.

Parameters
[in]sheetDefInsheet definition
[out]sheetRotationOutsheet rotation in radians
Returns
SUCCESS if the sheet rotation is obtained successfully, else ERROR.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlSheetDef_getSheetNumber ( SheetDefCP  sheetDefIn,
UInt32 sheetNumberOut 
)

For a sheet definition, get the sheet number.

Parameters
[in]sheetDefInsheet definition
[out]sheetNumberOutsheet number
Returns
SUCCESS if the sheet number is obtained successfully, else ERROR.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlSheetDef_getSize ( SheetDefCP  sheetDefIn,
double *  sheetWidthOut,
double *  sheetHeightOut 
)

For a sheet definition, get sheet size.

Parameters
[in]sheetDefInsheet definition
[out]sheetWidthOutsheet width
[out]sheetHeightOutsheet height
Returns
SUCCESS if the sheet size is obtained successfully, else ERROR.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlSheetDef_getUnits ( SheetDefCP  sheetDefIn,
DgnPlatform::UnitInfo *  unitInfoOut 
)

For a sheet definition, get its units.

Parameters
[in]sheetDefInsheet definition
[out]unitInfoOutsheet units
Returns
SUCCESS if the sheet units is obtained successfully, else ERROR.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlSheetDef_initialize ( SheetDefP  sheetDefIn)

Initialize new sheet definition structure.

Parameters
[in]sheetDefInsheet def structure
Returns
SUCCESS if the initialize is successfull else ERROR
Remarks
Required Library: mdlbltin.lib
bool mdlSheetDef_isEnabled ( SheetDefCP  sheetDefIn)

For a sheet definition, check if the sheet related information is enabled.

Parameters
[in]sheetDefInsheet definition
Returns
true if the sheet related information is enabled, else false
Remarks
Required Library: mdlbltin.lib
SheetDefP mdlSheetDef_new ( )

Allocate a new sheet definition structure.

Returns
A new sheet definition structure.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlSheetDef_setBorderAttachmentId ( SheetDefP  sheetDefIn,
UInt64  borderAttachmentIdIn 
)

For a sheet definition, set its border attachment id.

When a border attachment is associated a sheet definition, then the sheet definition is derived from the border attachment.

Parameters
[in]sheetDefInsheet definition
[in]borderAttachmentIdInsheet border attachment id
Returns
SUCCESS if the sheet border attachment id is successfully set
Remarks
Required Library: mdlbltin.lib
StatusInt mdlSheetDef_setColor ( SheetDefP  sheetDefIn,
UInt32  sheetColorIn 
)

For a sheet definition, set color.

Parameters
[in]sheetDefInsheet definition
[in]sheetColorInsheet color
Returns
SUCCESS if the sheet color is set successfully, else ERROR.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlSheetDef_setFormName ( SheetDefP  sheetDefIn,
WChar const *  formNameIn 
)

For a sheet definition, set its form name - this is a name associated with its size.

Parameters
[in]sheetDefInsheet definition
[in]formNameInsheet form name
Returns
SUCCESS if the sheet form name is set successfully, else ERROR.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlSheetDef_setOrigin ( SheetDefP  sheetDefIn,
DPoint2d const *  sheetOriginIn 
)

For a sheet definition, set its origin - the lower left hand corner of the sheet relative to the sheet model's origin.

Parameters
[in]sheetDefInsheet definition
[in]sheetOriginInsheet origin
Returns
SUCCESS if the sheet origin is set successfully, else ERROR.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlSheetDef_setPaperMargins ( SheetDefP  sheetDefIn,
double  topMarginIn,
double  leftMarginIn,
double  bottomMarginIn,
double  rightMarginIn 
)

For a sheet definition, set its margins.

Remarks
The SheetDef size and origin specifies the printable area. The total sheet size is the sum of the SheetDef size plus margins.
Parameters
[in]sheetDefInsheet definition
[in]topMarginIntop paper margin
[in]leftMarginInleft paper margin
[in]bottomMarginInbottom paper margin
[in]rightMarginInright paper margin
Returns
SUCCESS if the margins are set successfully, else ERROR.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlSheetDef_setPlotStyleTableFileName ( SheetDefP  sheetDefIn,
WChar const *  pstFileNameIn 
)

For a sheet definition, set the plot style table file name.

Parameters
[in]sheetDefInsheet definition
[in]pstFileNameInplot style table file name string
Returns
SUCCESS if the plot style file name is obtained successfully, else ERROR.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlSheetDef_setPrintStyleName ( SheetDefP  sheetDefIn,
WChar const *  printStyleNameIn 
)

For a sheet definition, set the print style name.

Parameters
[in]sheetDefInsheet definition
[in]printStyleNameInprint style name string
Returns
SUCCESS if the print style name is obtained successfully, else ERROR.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlSheetDef_setRotation ( SheetDefP  sheetDefIn,
double  sheetRotationIn 
)

For a sheet definition, set rotation - relative to the X axis of the sheet model in the XY plane.

Parameters
[in]sheetDefInsheet definition
[in]sheetRotationInsheet rotation in radians
Returns
SUCCESS if the sheet rotation is set successfully, else ERROR.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlSheetDef_setSheetNumber ( SheetDefP  sheetDefIn,
UInt32  sheetNumberIn 
)

For a sheet definition, set sheet number.

Parameters
[in]sheetDefInsheet definition
[in]sheetNumberInsheet number
Returns
SUCCESS if the sheet number is set successfully, else ERROR.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlSheetDef_setSize ( SheetDefP  sheetDefIn,
double  sheetWidthIn,
double  sheetHeightIn 
)

For a sheet definition, set size.

Parameters
[in]sheetDefInsheet definition
[in]sheetWidthInsheet width
[in]sheetHeightInsheet height
Returns
SUCCESS if the sheet size is set successfully, else ERROR.
Remarks
Required Library: mdlbltin.lib
StatusInt mdlSheetDef_setUnits ( SheetDefP  sheetDefIn,
DgnPlatform::UnitInfo const *  unitInfoIn 
)

For a sheet definition, set its units.

Parameters
[in]sheetDefInsheet definition
[out]unitInfoInsheet units
Returns
SUCCESS if the sheet units is set successfully, else ERROR.
Remarks
Required Library: mdlbltin.lib

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