Typedefs | |
typedef void(* | PFAddTagPreWrite )(MSElementP pEl) |
Function callback used by mdlTag_addDescrToCell. More... | |
Functions | |
int | mdlTag_getSetNames (StringListP *stringListPP, int *numSetsP, DgnModelRefP modelRef, int ownerID) |
Retrieves a sorted string list of names of available tag sets in a given design model. More... | |
int | mdlTag_createSetDef (WCharCP setNameP, WCharCP rptNameP, int ownerID, DgnTagDefinitionP attrDefsP, int numAttrDefs, DgnModelRefP modelRef) |
Creates a definition for a tag set. More... | |
int | mdlTag_setSetDef (WCharCP setNameP, int ownerID, WCharCP newSetNameP, WCharCP reportNameP, DgnModelRefP modelRef) |
Updates the definition of a tag set. More... | |
int | mdlTag_getSetDef (DgnTagDefinitionP *attrDefsPP, int *numAttrDefsP, WChar *rptNameP, WCharCP setNameP, int ownerID, DgnModelRefP modelRef) |
Retrieves an array of tag definitions for a given set. More... | |
int | mdlTag_getTagDef (DgnTagDefinitionP *attrDefPP, WCharCP setNameP, WCharCP attribNameP, int ownerID, DgnModelRefP modelRef) |
Retrieves the definition of a particular tag within a particular tag set. More... | |
int | mdlTag_setTagDef (DgnTagDefinitionP tagDefP, WCharCP setNameP, WCharCP attribNameP, int ownerID, DgnModelRefP modelRef) |
Changes the definition of an existing tag in a given set. More... | |
int | mdlTag_deleteSetDef (WCharCP setName, int ownerID, DgnModelRefP modelRef) |
Deletes the definition for a tag set. More... | |
void | mdlTag_freeTagDef (DgnTagDefinitionP tagDefP) |
Frees a tag definition and any dynamically allocated contents. More... | |
void | mdlTag_freeTagDefArray (DgnTagDefinitionP tagArrayP, int numTags) |
Frees an array of tag definitions and any dynamically allocated contents. More... | |
int | mdlTag_addTagDefToSet (DgnTagDefinitionP tagDefP, WCharCP setNameP, int ownerID, DgnModelRefP modelRef) |
Adds a new tag definition to an existing set. More... | |
int | mdlTag_deleteTagDef (DgnTagSpecP tagSpec) |
Deletes a tag definition from an existing tag set. More... | |
int | mdlTag_deleteTagInstances (WCharCP setNameP, WCharCP attribNameP, int ownerID, DgnModelRefP modelRef) |
Deletes all tag instances, (type 37 elements), for a given tag definition from the master file. More... | |
int | mdlTag_extract (Dpoint3d *origin, Dpoint3d *userOrigin, DgnTagSpecP tagSpec, bool *displayable, DgnTagValueP tagValue, DgnPlatform::ElementId *targetID, DPoint3dP offset, DgnPlatform::TextSizeParam *textSize, RotMatrixP rMatrix, DgnPlatform::TextParamWide *txtParams, MSElementCP element, DgnModelRefP modelRef) |
Extracts information about a tag element. More... | |
void | mdlTag_freeValue (DgnTagValueP pTagValue) |
Frees memory to hold certain types of tag value allocated from mdlTag_extract. More... | |
int | mdlTag_createVerify (MSElementP pElmOut, MSElementP pElmIn, DgnTagSpecP attrSpec, UShort *attrProps, DgnTagValueP value, DgnPlatform::ElementId *targetTag, DPoint3dP dPoint, DgnPlatform::TextSizeParam *txSizeWd, RotMatrixP rMatrix, DgnPlatform::TextParamWide *txtParams, WCharCP styleName, bool verifyPoint, int elType) |
Creates a tag element and optionally verfies the association point. More... | |
int | mdlTag_create (MSElementP pElmOut, MSElementP pElmIn, DgnTagSpecP tagSpec, UShort *tagProps, DgnTagValueP value, DgnPlatform::ElementId *targetID, DPoint3dP dPoint, DgnPlatform::TextSizeParam *txSizeWd, RotMatrixP rMatrix, DgnPlatform::TextParamWide *txtParams, WCharCP styleName) |
Creates a tag element. More... | |
int | mdlTag_getAssocElement (MSElementP assocElm, DgnModelRefP *modelRef, UInt32 *filePos, MSElementP tagElm) |
Gets the base element to which a tag is attached. More... | |
int | mdlTag_getElementTags (MSElementDescrH elemDescrPP, int *numElementDescrs, MSElementCP element, DgnModelRefP modelRef, int ownerID) |
Gets an element descriptor containing all the tags attached to a particular element. More... | |
int | mdlTag_generateReport (WCharCP fileName, WCharCP setNameP, StringListP tagList, UInt32 exportType, int ownerId) |
Generates an ASCII report file for the indicated tag set. More... | |
bool | mdlTag_extractURL (WStringP pStrURL, WStringP pStrDesc, MSElementCP pElement, DgnModelRefP modelRef) |
Get the URL and description from the tagged element. More... | |
int | mdlTag_attachURL (MSElementP pElement, UInt32 filePos, WCharCP pStrUrl, WCharCP pStrDesc) |
Attaches a URL web page and a description to an element. More... | |
bool | mdlTag_hasInternetTagSet (DgnTagSetSpecP pTagSetSpec) |
This function is used to check whether an internet tag exists on an element. More... | |
int | mdlTag_createInternetTagSet (DgnTagSetSpecP pTagSetSpec) |
Adds a tag specification for internet tags into the design file. More... | |
void | mdlTag_addDescrToCell (MSElementDescrH tagDscrPP, DgnModelRefP modelRef, DgnPlatform::ElementId elemTag, PFAddTagPreWrite preWriteFunc, bool addToFile) |
Associate tag set with a cell. More... | |
typedef void(* PFAddTagPreWrite)(MSElementP pEl) |
Function callback used by mdlTag_addDescrToCell.
[in,out] | pEl | Pointer to tag element. |
void mdlTag_addDescrToCell | ( | MSElementDescrH | tagDscrPP, |
DgnModelRefP | modelRef, | ||
DgnPlatform::ElementId | elemTag, | ||
PFAddTagPreWrite | preWriteFunc, | ||
bool | addToFile | ||
) |
Associate tag set with a cell.
[in] | tagDscrPP | An element descriptor chain of tags to be associated to the cell. Often acquired by a call to mdlCell_getElmDscr. |
[in] | modelRef | The model ref containing the cell to which the tags will be written. |
[in] | elemTag | The unique id of the cell header. |
[in] | preWriteFunc | A function called for each tag before it is written but after it is correctly located. Typically used to change the value. Can be NULL. |
[in] | addToFile | If true, the tags will be written to the modelRef provided. 2D/3D conversions are handled automatically. |
int mdlTag_addTagDefToSet | ( | DgnTagDefinitionP | tagDefP, |
WCharCP | setNameP, | ||
int | ownerID, | ||
DgnModelRefP | modelRef | ||
) |
Adds a new tag definition to an existing set.
[in] | tagDefP | specifies a pointer to the definition of the new tag. |
[in] | setNameP | specifies the name of the tag set where the new tag should be added. |
[in] | ownerID | is an ID value that can distinguish the owner of the tag set. Pass 0 for the default if not using a custom ID value. |
[in] | modelRef | specifies the design model in which to search for the tag set. |
int mdlTag_attachURL | ( | MSElementP | pElement, |
UInt32 | filePos, | ||
WCharCP | pStrUrl, | ||
WCharCP | pStrDesc | ||
) |
Attaches a URL web page and a description to an element.
[in] | pElement | the element to attach the URL to. |
[in] | filePos | file position of the element. |
[in] | pStrUrl | URL specification to attach as an internet tag. |
[in] | pStrDesc | description of the URL specification. |
int mdlTag_create | ( | MSElementP | pElmOut, |
MSElementP | pElmIn, | ||
DgnTagSpecP | tagSpec, | ||
UShort * | tagProps, | ||
DgnTagValueP | value, | ||
DgnPlatform::ElementId * | targetID, | ||
DPoint3dP | dPoint, | ||
DgnPlatform::TextSizeParam * | txSizeWd, | ||
RotMatrixP | rMatrix, | ||
DgnPlatform::TextParamWide * | txtParams, | ||
WCharCP | styleName | ||
) |
Creates a tag element.
[out] | pElmOut | specifies a pointer to an MSElement structure where the output element will be stored. |
[in] | pElmIn | specifies a pointer to an MSElement to be used as a template for the new tag. Pass NULL if no template element is being supplied. |
[in] | tagSpec | specifies a pointer to a specification for the definition of the tag. |
[in] | tagProps | specifies a mask containing information about the characteristics of the tag. See tagdata.h for possible values for this mask. |
[in] | value | specifies a pointer to a value for the tag. If this pointer is NULL, the default value for the tag is retrieved from the tags definition. |
[in] | targetID | specifies the id value for the element to which the tag will be attached, if it is attached. |
[in] | dPoint | specifies a pointer to a DPoint3d structure which contains the origin of the tag element if it is not being attached or the offset from the base element if it is being attached. NULL can be passed if there is to be no offset from the base element. |
[in] | txSizeWd | specifies a pointer to a DgnPlatform::TextSizeParam structure containing the size for the text used to display the tags value. NULL can be passed to indicate that these values should come from the style name or the active settings. |
[in] | rMatrix | specifies a pointer to a rotation matrix which gives the rotation of the display text. NULL can be passed to indicate that these values should come from the style name or the active settings. |
[in] | txtParams | specifies a pointer to a structure containing additional parameters for the text display of the tag's value. NULL can be passed to indicate that these values should come from the style name or the active settings. |
[in] | styleName | specifies a pointer to a text style name. NULL can be passed if the text characteristics are to come from the txSizeWd and txtParams arguments or from the active settings. |
int mdlTag_createInternetTagSet | ( | DgnTagSetSpecP | pTagSetSpec | ) |
Adds a tag specification for internet tags into the design file.
[in] | pTagSetSpec | the DgnPlatform::DgnTagSetSpec of the internet tag to add to the design file. |
int mdlTag_createSetDef | ( | WCharCP | setNameP, |
WCharCP | rptNameP, | ||
int | ownerID, | ||
DgnTagDefinitionP | attrDefsP, | ||
int | numAttrDefs, | ||
DgnModelRefP | modelRef | ||
) |
Creates a definition for a tag set.
[in] | setNameP | specifies the name of the set to be created. Set names must be unique within a design file. The maximum size of a tag set name is defined by TAG_SET_NAME_MAX. |
[in] | rptNameP | is the name of the report file for the set. If the name of the report file is not being set, pass NULL. |
[in] | ownerID | is an ID value that can distinguish the owner of the tag set. Pass 0 for the default if not using a custom ID value. |
[in] | attrDefsP | specifies an array of tag definitions. |
[in] | numAttrDefs | number of attributes in set |
[in] | modelRef | indicates the model reference that contains the tag set. |
int mdlTag_createVerify | ( | MSElementP | pElmOut, |
MSElementP | pElmIn, | ||
DgnTagSpecP | attrSpec, | ||
UShort * | attrProps, | ||
DgnTagValueP | value, | ||
DgnPlatform::ElementId * | targetTag, | ||
DPoint3dP | dPoint, | ||
DgnPlatform::TextSizeParam * | txSizeWd, | ||
RotMatrixP | rMatrix, | ||
DgnPlatform::TextParamWide * | txtParams, | ||
WCharCP | styleName, | ||
bool | verifyPoint, | ||
int | elType | ||
) |
Creates a tag element and optionally verfies
the association point.
[out] | pElmOut | specifies a pointer to an MSElement structure where the output element will be stored. |
[out] | pElmOut | the attribute element created |
[in] | pElmIn | specifies a pointer to an MSElement to be used as a template for the new tag. Pass NULL if no template element is being supplied. |
[in] | attrSpec | specifies an attribute to add |
[in] | attrProps | specifies the properties of the attribute |
[in] | value | specifies a pointer to a value for the attribute. If this pointer is NULL, the default value for the attribute is retrieved from the definition. |
[in] | targetTag | specifies the target element's tag or NULL. |
[in] | dPoint | specifies a pointer to a DPoint3d structure which contains the origin of the tag element if it is not being attached or the offset from the base element if it is being attached. NULL can be passed if there is to be no offset from the base element. |
[in] | txSizeWd | specifies a pointer to a DgnPlatform::TextSizeParam structure containing the size for the text used to display the tags value. NULL can be passed to indicate that these values should come from the style name or the active settings. |
[in] | rMatrix | specifies a pointer to a rotation matrix which gives the rotation of the display text. NULL can be passed to indicate that these values should come from the style name or the active settings. |
[in] | txtParams | specifies a pointer to a structure containing additional parameters for the text display of the tag's value. NULL can be passed to indicate that these values should come from the style name or the active settings. |
[in] | styleName | specifies a pointer to a text style name. NULL can be passed if the text characteristics are to come from the txSizeWd and txtParams arguments or from the active settings. |
[in] | verifyPoint | if true, the association point is verified before the function returns to the caller. |
[in] | elType | the element type to associate to |
int mdlTag_deleteSetDef | ( | WCharCP | setName, |
int | ownerID, | ||
DgnModelRefP | modelRef | ||
) |
Deletes the definition for a tag set.
[in] | setName | specifies the name of the set to be deleted. The maximum size of a tag set name is defined by TAG_SET_NAME_MAX. |
[in] | ownerID | is an ID value that can distinguish the owner of the tag set. Pass 0 for the default if not using a custom ID value. |
[in] | modelRef | indicates the model reference that contains the tag set. |
int mdlTag_deleteTagDef | ( | DgnTagSpecP | tagSpec | ) |
Deletes a tag definition from an
existing tag set.
mdlTag_deleteTagInstances should always be called before this function, since tags should be deleted when their definition is deleted.
[in] | tagSpec | specifies a pointer to the specification for the tag. |
int mdlTag_deleteTagInstances | ( | WCharCP | setNameP, |
WCharCP | attribNameP, | ||
int | ownerID, | ||
DgnModelRefP | modelRef | ||
) |
Deletes all tag instances, (type 37 elements),
for a given tag definition from the master file.
mdlTag_deleteTagInstances should always be called before a call to mdlTag_deleteTagDef since tags should be deleted when their definition is deleted.
[in] | setNameP | specifies the name of the set for the tag. |
[in] | attribNameP | specifies the name of the tag. |
[in] | ownerID | is an ID value that can distinguish the owner of the tag set. Pass 0 for the default if not using a custom ID value. |
[in] | modelRef | specifies the design model in which to search for the tag set. |
int mdlTag_extract | ( | Dpoint3d * | origin, |
Dpoint3d * | userOrigin, | ||
DgnTagSpecP | tagSpec, | ||
bool * | displayable, | ||
DgnTagValueP | tagValue, | ||
DgnPlatform::ElementId * | targetID, | ||
DPoint3dP | offset, | ||
DgnPlatform::TextSizeParam * | textSize, | ||
RotMatrixP | rMatrix, | ||
DgnPlatform::TextParamWide * | txtParams, | ||
MSElementCP | element, | ||
DgnModelRefP | modelRef | ||
) |
Extracts information about a tag element.
Any of the output parameters can be NULL, indicating the caller does not care about that piece of information.
[out] | origin | the origin of the tag element if it is not associated (attached) to another element. If it is attached to another element, origin is the origin of that element. |
[out] | userOrigin | the tag element's snap point. |
[out] | tagSpec | specification for the definition of the tag. |
[out] | displayable | true if the tag is displayed else false |
[out] | tagValue | the tag value. |
[out] | targetID | if attached, then the DgnPlatform::ElementId of the element to which the tag is attached. |
[out] | offset | if attached, then the offset of the tag element from its base element. origin + offset is the user origin of the tag. |
[out] | textSize | text size parameters - used when tag is displayed. |
[out] | rMatrix | rotation matrix - used when tag is displayed. |
[out] | txtParams | text wide params - used when tag is displayed. |
[in] | element | tag element from which the values are extracted. |
[in] | modelRef | model that contains the element. |
bool mdlTag_extractURL | ( | WStringP | pStrURL, |
WStringP | pStrDesc, | ||
MSElementCP | pElement, | ||
DgnModelRefP | modelRef | ||
) |
Get the URL and description from the tagged element.
[out] | pStrURL | actual URL, pass NULL if you don't care |
[out] | pStrDesc | actual Description, NULL if not needed |
[in] | pElement | Element to extract URL from. |
[in] | modelRef | model for set |
void mdlTag_freeTagDef | ( | DgnTagDefinitionP | tagDefP | ) |
Frees a tag definition and any dynamically
allocated contents.
[in,out] | tagDefP | specifies the tag definition to free. |
void mdlTag_freeTagDefArray | ( | DgnTagDefinitionP | tagArrayP, |
int | numTags | ||
) |
Frees an array of tag definitions and any
dynamically allocated contents.
[in] | tagArrayP | specifies the array of tag definitions to free. |
[in] | numTags | specifies the number of tags in the array. |
void mdlTag_freeValue | ( | DgnTagValueP | pTagValue | ) |
Frees memory to hold certain types of tag value allocated from mdlTag_extract.
[in] | pTagValue | tag value to be freed |
int mdlTag_generateReport | ( | WCharCP | fileName, |
WCharCP | setNameP, | ||
StringListP | tagList, | ||
UInt32 | exportType, | ||
int | ownerId | ||
) |
Generates an ASCII report file for the indicated tag set.
[in] | fileName | the file name with path where the report will be generated. Even though the filename is specified in the tag set, fileName is the fully- qualified filename, specifying more information than the tag set contains. If the name specified in fileName disagrees with the name in the tag set, fileName takes priority. |
[in] | setNameP | specifies the name of the tag set which should be reported on. |
[in] | tagList | specifies a string list containing the names of the columns for the report. The columns of the report will appear in the same order as the strings in the string list. |
[in] | exportType | is either TAG_EXPORT_TAGGED or TAG_EXPORT_ALL, indicating whether only tagged elements are reported on or all elements are reported on, respectively. |
[in] | ownerId | is an ID value that can distinguish the owner of the tag set. Pass 0 for the default if not using a custom ID value. |
int mdlTag_getAssocElement | ( | MSElementP | assocElm, |
DgnModelRefP * | modelRef, | ||
UInt32 * | filePos, | ||
MSElementP | tagElm | ||
) |
Gets the base element to which a tag is attached.
[out] | assocElm | specifies the base element for the tag. |
[in] | modelRef | specifies the design model containing the tag element whose base element should be obtained. The model reference of the base element is returned back if it is different from the tag element. |
[out] | filePos | specifies the file position for the base element. NULL can be passed if the file position is not needed. |
[in] | tagElm | specifies the tag element whose base element should be obtained. |
int mdlTag_getElementTags | ( | MSElementDescrH | elemDescrPP, |
int * | numElementDescrs, | ||
MSElementCP | element, | ||
DgnModelRefP | modelRef, | ||
int | ownerID | ||
) |
Gets an element descriptor containing
all the tags attached to a particular element.
[out] | elemDescrPP | specifies an element descriptor containing all the tag elements attached to a base element. |
[out] | numElementDescrs | specifies the number of tags retrieved. |
[in] | element | specifies a pointer to the element for which to get tags. |
[in] | modelRef | indicates the model containing the input element for which to get tags. |
[in] | ownerID | is an ID value that can distinguish the owner of the tag set. Pass 0 for the default if not using a custom ID value. |
int mdlTag_getSetDef | ( | DgnTagDefinitionP * | attrDefsPP, |
int * | numAttrDefsP, | ||
WChar * | rptNameP, | ||
WCharCP | setNameP, | ||
int | ownerID, | ||
DgnModelRefP | modelRef | ||
) |
Retrieves an array of tag definitions for a given set.
[out] | attrDefsPP | specifies a tag definition pointer which points to the array of tag definitions found. MicroStation allocates the memory for tagDefs, and the calling application should free it by calling mdlTag_freeTagDefArray when it is no longer needed. |
[out] | numAttrDefsP | is a pointer to an integer indicated the number of attributes that exist in the tag set. |
[out] | rptNameP | is the name of the report file for the set. |
[in] | setNameP | specifies the set whose tag definitions should be retrieved. |
[in] | ownerID | is an ID value that can distinguish the owner of the tag set. Pass 0 for the default if not using a custom ID value. |
[in] | modelRef | specifies the design model in which to search for the tag set. |
int mdlTag_getSetNames | ( | StringListP * | stringListPP, |
int * | numSetsP, | ||
DgnModelRefP | modelRef, | ||
int | ownerID | ||
) |
Retrieves a sorted string list of names of available tag sets in a given design model.
[out] | stringListPP | string list of names |
[out] | numSetsP | number of sets found. |
[in] | modelRef | modelref of set. |
[in] | ownerID | an ID value that can distinguish the owner of the tag set. Pass 0 for the default if not using a custom ID value. |
int mdlTag_getTagDef | ( | DgnTagDefinitionP * | attrDefPP, |
WCharCP | setNameP, | ||
WCharCP | attribNameP, | ||
int | ownerID, | ||
DgnModelRefP | modelRef | ||
) |
Retrieves the definition of a particular tag within a particular tag set.
[out] | attrDefPP | specifies a pointer to a tag definition which points to the tag definition found. MicroStation allocates memory for tagDef, so the calling application should free this memory using mdlTag_freeTagDef when no longer needed. |
[in] | setNameP | specifies the name of the set for the tag desired. |
[in] | attribNameP | specifies the name of the tag whose definition should be retrieved. |
[in] | ownerID | is an ID value that can distinguish the owner of the tag set. Pass 0 for the default if not using a custom ID value. |
[in] | modelRef | specifies the design model in which to search for the tag set. |
bool mdlTag_hasInternetTagSet | ( | DgnTagSetSpecP | pTagSetSpec | ) |
This function is used to check whether an internet tag exists on an element.
[out] | pTagSetSpec | return the DgnPlatform::DgnTagSetSpec of the internet tag attached to the element. |
int mdlTag_setSetDef | ( | WCharCP | setNameP, |
int | ownerID, | ||
WCharCP | newSetNameP, | ||
WCharCP | reportNameP, | ||
DgnModelRefP | modelRef | ||
) |
Updates the definition of a tag set.
[in] | setNameP | specifies the name of the set to update. |
[in] | ownerID | is an ID value that can distinguish the owner of the tag set. Pass 0 for the default if not using a custom ID value. |
[in] | newSetNameP | specifies the new name for the set. If the name of the set is not being changed, pass NULL. |
[in] | reportNameP | is the name of the report file for the set. If the name of the report file is not being changed, pass NULL. |
[in] | modelRef | indicates the model reference that contains the tag set. |
int mdlTag_setTagDef | ( | DgnTagDefinitionP | tagDefP, |
WCharCP | setNameP, | ||
WCharCP | attribNameP, | ||
int | ownerID, | ||
DgnModelRefP | modelRef | ||
) |
Changes the definition of an existing
tag in a given set.
The tag set and the tag definition must already exist.
[in] | tagDefP | specifies a pointer to the new definition for the tag. |
[in] | setNameP | specifies the name of the tag set containing the tag. |
[in] | attribNameP | specifies the name of the tag to be set. |
[in] | ownerID | is an ID value that can distinguish the owner of the tag set. Pass 0 for the default if not using a custom ID value. |
[in] | modelRef | specifies the design model in which to search for the tag set. |