Functions | |
int | mdlLineStyle_numberFromName (Int32 *pStyleNo, WCharCP pWName, DgnModelRefP modelRef, int createIfNotFound) |
Finds the line style number for line style of the given name. More... | |
StatusInt | mdlLineStyle_nameFromNumber (WCharP pName, int nameLength, long styleNo, DgnModelRefP modelRef, int option) |
Find the line style name for line style of the given number. More... | |
int | mdlLineStyle_extractEffectiveParams (LineStyleParamsP pStyleParamOut, MSElementCP pElementIn, const DgnModelRefP pModelRefIn, void *pElementPathIn, int viewIndexIn) |
The effective line style of an element is the fully resolved line style; in other words, the style with which it will be drawn. More... | |
int | mdlLineStyle_extractParams (LineStyleParamsP pStyleParamOut, MSElementCP pElementIn) |
Extract the line style parameter linkage from an element. More... | |
void | mdlLineStyle_infoExtract (LineStyleParamsP pParams, LineStyleInfoCP pLsInfo) |
Extracts line style parameters from the specified line style information. More... | |
int | mdlLineStyle_getElementDescr (MSElementDescrH pOutDscr, MSElementDescrP pInDscr, DgnModelRefP modelRef, int option) |
Convert an element with a custom line style to the individual primitive elements that represent the line style components. More... | |
int | mdlLineStyle_expandSymbolDescr (MSElementDescrH symDscr, MSElementDescrP elmDscr, DgnModelRefP modelRef) |
Duplicate the elements in elmDscr, expand any elements that cannot be used in a point symbol and appends them to the element descriptor chain symDscr. More... | |
int | mdlLineStyle_createSymbolResource (DgnPlatform::PointSymRsc **pSymRsc, MSElementDescrP symDscr, Dpoint3d *pOrigin) |
Allocate and initialize a point symbol resource and appends the elements from the element descriptor chain symDscr. More... | |
void | mdlLineStyle_freeSymbolResource (DgnPlatform::PointSymRsc **ppSymRsc) |
Reclaim the memory occupied by a point symbol resource. More... | |
StatusInt | mdlLineStyle_reloadAll (WCharCP fileName, DgnModelRefP modelRef, long option) |
Reload all line style resources. More... | |
StringListP | mdlLineStyle_getLinNames (WCharCP linFileName, int numInfoFields) |
Get a StringList of style names and descriptions in a .lin file. More... | |
StatusInt | mdlLineStyle_loadLinDefinition (WCharCP linFileName, WCharCP *definitionsToLoad, int numDefinitions, DgnModelRefP modelRef, double linUnitsToMuFactor) |
Load one or more definitions from a .lin file into the specified design file. More... | |
int mdlLineStyle_createSymbolResource | ( | DgnPlatform::PointSymRsc ** | pSymRsc, |
MSElementDescrP | symDscr, | ||
Dpoint3d * | pOrigin | ||
) |
Allocate and initialize a point symbol resource and appends the elements from the element descriptor chain symDscr.
The element descriptor, symDscr, should be created using mdlLineStyle_expandSymbolDescr so that it does not contain elements that cannot be used in a line style definition.
[out] | pSymRsc | New symbol resource (allocated) |
[in] | symDscr | Element descriptor from which resource will be created. |
[in] | pOrigin | The coordinates of the symbol origin must be specified in pOrigin. |
int mdlLineStyle_expandSymbolDescr | ( | MSElementDescrH | symDscr, |
MSElementDescrP | elmDscr, | ||
DgnModelRefP | modelRef | ||
) |
Duplicate the elements in elmDscr, expand any elements that cannot be used in a point symbol and appends them to the element descriptor chain symDscr.
If *symDscr is NULL, a new element descriptor is allocated.
[out] | symDscr | element descriptor; if *symDscr is not NULL, elements will be appended. If *symDscr is NULL, a new element descriptor will be created. This parameter may not be NULL. |
[in] | elmDscr | existing element descriptor |
[in] | modelRef | The modelRef argument is required to resolve associative points and shared cell definitions. Use ACTIVEMODEL for the active model, or a valid DgnModelRefP to indicate information from a referenced file. |
int mdlLineStyle_extractEffectiveParams | ( | LineStyleParamsP | pStyleParamOut, |
MSElementCP | pElementIn, | ||
const DgnModelRefP | pModelRefIn, | ||
void * | pElementPathIn, | ||
int | viewIndexIn | ||
) |
The effective line style of an element is the fully resolved line style; in other words, the style with which it will be drawn.
. If a line style is by level, this function will extract the level override parameters, and then apply the element override parameters. This is different from mdlLineStyle_extractParams which will return only the element line style parameters. Use LineStyleManager::GetNumberFromName() or LineStyleManager::GetStyleIDForDesignFile() for a newer API.
[out] | pStyleParamOut | Custom parameters applied to line style on this element. |
[in] | pElementIn | Element to get lines style for. |
[in] | pModelRefIn | Model ref associated with this element. |
[in] | pElementPathIn | Element path (currently unused). |
[in] | viewIndexIn | The view index is used to extract whether the line style overrides are active for the element. |
int mdlLineStyle_extractParams | ( | LineStyleParamsP | pStyleParamOut, |
MSElementCP | pElementIn | ||
) |
Extract the line style parameter linkage from an element.
The parameters describe specific overrides to a line style that apply only to the particular element. See the StyleParams structure for a list of the possible overrides.
[out] | pStyleParamOut | custom parameters applied to line style on this element. |
[in] | pElementIn | points to element to get lines style for. |
void mdlLineStyle_freeSymbolResource | ( | DgnPlatform::PointSymRsc ** | ppSymRsc | ) |
Reclaim the memory occupied by a point symbol resource.
[in] | ppSymRsc | the symbol resource, previously allocated by mdlLineStyle_createSymbolResource |
int mdlLineStyle_getElementDescr | ( | MSElementDescrH | pOutDscr, |
MSElementDescrP | pInDscr, | ||
DgnModelRefP | modelRef, | ||
int | option | ||
) |
Convert an element with a custom line style to the individual primitive elements that represent the line style components.
[out] | pOutDscr | points to the address of an element descriptor containing the component elements representing the line style. |
[in] | pInDscr | is an element with a custom line style. |
[in] | modelRef | is the model containing pInDscr. ACTIVEMODEL can be used for the active model, or a valid DgnModelRefP can be specified for a referenced model. |
[in] | option | If option is set to LSOPT_SETGG, the output elements are placed in a graphic group. If it is zero, they are not. |
StringListP mdlLineStyle_getLinNames | ( | WCharCP | linFileName, |
int | numInfoFields | ||
) |
Get a StringList of style names and descriptions in a .lin file.
See LineStyleUtil::GetLinNameList() for a better API than stringlists.
[in] | linFileName | The name of the lin file to parse. |
[in] | numInfoFields | The number of info fields for the StringList. If it is to be used in a dialog box, this should be 1. |
void mdlLineStyle_infoExtract | ( | LineStyleParamsP | pParams, |
LineStyleInfoCP | pLsInfo | ||
) |
Extracts line style parameters from the specified line style information.
[in,out] | pParams | a DgnPlatform::LineStyleParams structure pointer indicating where the data will be copied to. |
[in] | pLsInfo | the DgnPlatform::LineStyleInfo to copy the style parameters from. |
StatusInt mdlLineStyle_loadLinDefinition | ( | WCharCP | linFileName, |
WCharCP * | definitionsToLoad, | ||
int | numDefinitions, | ||
DgnModelRefP | modelRef, | ||
double | linUnitsToMuFactor | ||
) |
Load one or more definitions from a .lin file into the specified design file.
[in] | linFileName | The name of the lin file to parse. |
[in] | definitionsToLoad | An array of strings containing the names of the definitions to load. |
[in] | numDefinitions | The number of names in the array definitionsToLoad. |
[in] | modelRef | A modelRef from the design file to load the definitions. Since linestyles are file-wide, any model ref from the file is acceptable. |
[in] | linUnitsToMuFactor | A conversion factor from the units in the .lin file to the master units of the DGN file. |
StatusInt mdlLineStyle_nameFromNumber | ( | WCharP | pName, |
int | nameLength, | ||
long | styleNo, | ||
DgnModelRefP | modelRef, | ||
int | option | ||
) |
Find the line style name for line style of the given number.
The number is the value that is stored on the element; the name is what is displayed in the dialog box or acquired from functions such as mdlLineStyle_nameGetStringList. Use LineStyleManager::GetNameFromNumber() for a newer API that returns a WString.
[out] | pName | the line style name, or "\0" if not found. This parameter can be NULL when checking for existence. |
[in] | nameLength | The number of characters in the buffer pName. |
[in] | styleNo | the line style number to find. |
[in] | modelRef | the model to search for the line style. Line style ids are dependent on the name map of the file they are in. |
[in] | option | Currently unused; pass 0 for compatibility with future versions. |
int mdlLineStyle_numberFromName | ( | Int32 * | pStyleNo, |
WCharCP | pWName, | ||
DgnModelRefP | modelRef, | ||
int | createIfNotFound | ||
) |
Finds the line style number for line style of the given name.
The number is the value that is stored on the element; the name is what is displayed in the dialog box or acquired from functions such as mdlLineStyle_getNameListModelW.
[out] | pStyleNo | The line style number, or 0 if not found. Can be NULL to just check for existence. |
[in] | pWName | The line style name to find an ID for. |
[in] | modelRef | The model to search for the line style. Line style ids are dependent on the name map of the file they are in. |
[in] | createIfNotFound | If the name is not found and this option is true, then a new name map entry will be created. Programs that plan on using this number to set the line style should always pass true. |
StatusInt mdlLineStyle_reloadAll | ( | WCharCP | fileName, |
DgnModelRefP | modelRef, | ||
long | option | ||
) |
Reload all line style resources.
It is necessary when a resource file that is currently loaded in MicroStation is modified.
[in] | fileName | the name of the file that changed. If this is not NULL, this resource file will be closed completely and reopened in MicroStation read-only to access the styles. |
[in] | modelRef | The modelRef to reload the name map for; usually ACTIVEMODEL. |
[in] | option | Currently unused; should be set to 0. |