Namespaces | Classes | Macros | Typedefs | Functions
Dimension Styles

Find active style tabel entry ID from given model. More...

Namespaces

 Bentley
 The Bentley namespace contains types defined by the Bentley Library.
 
 Bentley::DgnPlatform
 The DgnPlatform namespace contains types defined by the DgnPlatform.
 

Classes

struct  IDimStyleTransactionListener
 
struct  DimStyleEvents
 
struct  DimensionStyle
 Class to manipulate a dimensionstyle in a DgnFile. More...
 
struct  DimStyleIterator
 A forward iterator to go through the list of styles in a file. More...
 
struct  DimStyleCollection
 A collection dimension styles in a file. More...
 
struct  DimStylePropMask
 The property mask contains a series of boolean flags, one for each DimStyleProp that can be stored in a dimension style. More...
 

Macros

#define DIMSTYLE_COMPAREOPTS_Default   (0)
 
#define DIMSTYLE_COMPAREOPTS_IgnoreUnusedDiffs   (0x0001 << 1)
 
#define DIMSTYLE_COMPAREOPTS_UserInterface   DIMSTYLE_COMPAREOPTS_IgnoreUnusedDiffs
 
#define DIMSTYLE_NAMELIST_StyleNone   (0x0001 << 0) /* Must add style (none). */
 
#define DIMSTYLE_NAMELIST_StylesOnly   (0x0001 << 1) /* No style (none). */
 
#define DIMSTYLE_NAMELIST_BoldIfLocal   (0x0001 << 4) /* Styles in active file are bold in list; standard presentation */
 
#define DIMSTYLE_NAMELIST_UseSortFunc   (0x0001 << 5) /* Use the internal sort function that puts None at the top and sorts alphabetically */
 
#define DIMSTYLE_NAMELIST_DEFAULT   (DIMSTYLE_NAMELIST_BoldIfLocal | DIMSTYLE_NAMELIST_UseSortFunc)
 

Typedefs

typedef struct
DgnPlatform::DimensionStyle * 
DimensionStyleP
 
typedef struct
DgnPlatform::DimensionStyle & 
DimensionStyleR
 
typedef struct
DgnPlatform::DimensionStyle
const * 
DimensionStyleCP
 
typedef struct
DgnPlatform::DimensionStyle
const & 
DimensionStyleCR
 
typedef struct
DgnPlatform::DimStylePropMask * 
DimStylePropMaskP
 
typedef struct
DgnPlatform::DimStylePropMask & 
DimStylePropMaskR
 
typedef struct
DgnPlatform::DimStylePropMask
const * 
DimStylePropMaskCP
 
typedef struct
DgnPlatform::DimStylePropMask
const & 
DimStylePropMaskCR
 
typedef struct
DgnPlatform::DimStyleIterator * 
DimStyleIteratorP
 
typedef struct
DgnPlatform::DimStyleIterator & 
DimStyleIteratorR
 
typedef struct
DgnPlatform::DimStyleIterator
const * 
DimStyleIteratorCP
 
typedef struct
DgnPlatform::DimStyleIterator
const & 
DimStyleIteratorCR
 
typedef RefCountedPtr
< DimensionStyle > 
DimensionStylePtr
 
typedef RefCountedPtr
< DimStylePropMask > 
DimStylePropMaskPtr
 
typedef RefCountedPtr
< DimStyleIterator > 
DimStyleIteratorPtr
 
typedef DimStylePropMaskPtr PropertyMaskPtr
 
typedef DimStyleIterator const_iterator
 
typedef const_iterator iterator
 only const iteration is possible More...
 

Functions

virtual void _OnDimStyleChange (DimensionStyleCP before, DimensionStyleCP after, StyleEventType type, StyleEventSource source)=0
 
static DimensionStylePtr Create (WCharCP name, DgnFileR file)
 Create a new DimensionStyle object. The style is not be persisted automatically. More...
 
static DimensionStylePtr GetByName (WCharCP name, DgnFileR file)
 Find an existing persistent Named DimensionStyle. More...
 
static DimensionStylePtr GetByID (ElementId elemID, DgnFileR file)
 Find an existing persistent Named DimensionStyle. More...
 
static DimensionStylePtr GetSettings (DgnFileR file)
 Get the active dimension settings from a file. More...
 
static BentleyStatus ReplaceSettings (DimensionStyleR settings, DgnFileR file)
 Overwrite the active dimension settings from a file. More...
 
static bvector< DimensionStylePtr > BuildList (DgnFileR file)
 Create a list of all the styles in the specified file. More...
 
BentleyStatus Add (DgnFileP file=0)
 Add this DimensionStyle to a DgnFile. More...
 
BentleyStatus Replace (WCharCP oldName=0, DgnFileP file=0)
 Replace an existing persistent DimensionStyle in a DgnFile. More...
 
static BentleyStatus Delete (WCharCP name, DgnFileR file)
 Deletes a dimension style from a dgn file. More...
 
bool HasDependants () const
 Tests whether any elements store a persistent reference to the style. More...
 
static BentleyStatus RemapDependents (WCharCP destStyle, WCharCP sourceStyle, DgnFileR file)
 Remap all the elements that reference one style to different style. More...
 
StatusInt GetUnitsProp (UnitDefinitionP master, UnitDefinitionP sub, DimStyleProp iProp) const
 Get the value of a units type property. More...
 
StatusInt SetUnitsProp (UnitDefinitionCR master, UnitDefinitionCR sub, DimStyleProp iProp)
 Change the value of a units type property. The master unit must be larger than or the same size as the sub unit. More...
 
WStringCR GetName () const
 Get the name of this style. More...
 
ElementId GetID () const
 Get the id of this style. More...
 
DgnFileP GetFile () const
 Get the file which serves as the context for this style. More...
 
UInt32 GetTextStyleId () const
 Get the id of the TextStyle used by this style. If this style does not refer to a TextStyle this method will return zero. More...
 
DimensionStylePtr Copy () const
 Make a copy of this style object. More...
 
void CopyValues (DimensionStyleCR source)
 Copy all the properties from another style object into this one. More...
 
BentleyStatus SetName (WCharCP newName)
 Set the name of this style. More...
 
DimStylePropMaskPtr Compare (DimensionStyleCR otherStyle, UInt32 compareOpts=(0)) const
 Compare this style object with another one. More...
 
StatusInt ConvertToFile (DgnFileR file)
 Change the context of this style to another DgnFile. More...
 
double GetUorScale (DgnModelR destModel) const
 Obtain a scale factor needed to interpret style distance properties. More...
 
StatusInt GetAccuracyProp (byte &valueOut, DimStyleProp iProp) const
 Get the value of an accuracy type property. More...
 
StatusInt GetBooleanProp (bool &valueOut, DimStyleProp iProp) const
 Get the value of a boolean type property. More...
 
StatusInt GetCharProp (UShort &valueOut, DimStyleProp iProp) const
 Get the value of a char type property. More...
 
StatusInt GetDoubleProp (double &valueOut, DimStyleProp iProp) const
 Get the value of a double type property. More...
 
StatusInt GetDistanceProp (double &valueOut, DimStyleProp iProp, DgnModelP dgnModel) const
 Get the value of a distance type property. More...
 
StatusInt GetIntegerProp (int &valueOut, DimStyleProp iProp) const
 Get the value of an integer type property. More...
 
StatusInt GetLevelProp (LevelId &valueOut, DimStyleProp iProp) const
 Get the value of a level type property. More...
 
StatusInt GetStringProp (WStringR valueOut, DimStyleProp iProp) const
 Get the value of a string type property. More...
 
StatusInt GetFontProp (UInt32 &valueOut, DimStyleProp iProp) const
 Get the value of a font type property. More...
 
StatusInt GetColorProp (UInt32 &valueOut, DimStyleProp iProp) const
 Get the value of an accuracy type property. More...
 
StatusInt GetWeightProp (UInt32 &valueOut, DimStyleProp iProp) const
 Get the value of a weight type property. More...
 
StatusInt GetLineStyleProp (Int32 &valueOut, DimStyleProp iProp) const
 Get the value of a linestyle type property. More...
 
StatusInt GetOneUnitProp (UnitDefinitionR valueOut, DimStyleProp iProp) const
 Get the value of a unit type property. To change a unit property use SetUnitsProp(). More...
 
StatusInt GetTextStyleProp (DgnTextStylePtr &valueOut, DimStyleProp iProp) const
 Get the value of a text style type property. More...
 
StatusInt GetTemplateFlagProp (UShort &valueOut, DimensionType dimensionType, DimStyleProp iProp) const
 Get the value of a template flag. More...
 
StatusInt SetAccuracyProp (byte valueIn, DimStyleProp iProp)
 Change the value of an accuracy type property. More...
 
StatusInt SetBooleanProp (bool valueIn, DimStyleProp iProp)
 Change the value of a boolean type property. More...
 
StatusInt SetCharProp (UShort valueIn, DimStyleProp iProp)
 Change the value of a char type property. More...
 
StatusInt SetDoubleProp (double valueIn, DimStyleProp iProp)
 Change the value of a double type property. More...
 
StatusInt SetDistanceProp (double valueIn, DimStyleProp iProp, DgnModelP dgnModel)
 Change the value of a distance type property. More...
 
StatusInt SetIntegerProp (int valueIn, DimStyleProp iProp)
 Change the value of an integer type property. More...
 
StatusInt SetLevelProp (LevelId valueIn, DimStyleProp iProp)
 Change the value of a level type property. More...
 
StatusInt SetStringProp (WCharCP valueIn, DimStyleProp iProp)
 Change the value of a string type property. More...
 
StatusInt SetFontProp (UInt32 valueIn, DimStyleProp iProp)
 Change the value of a font type property. More...
 
StatusInt SetColorProp (UInt32 valueIn, DimStyleProp iProp)
 Change the value of a color type property. More...
 
StatusInt SetWeightProp (UInt32 valueIn, DimStyleProp iProp)
 Change the value of a weight type property. More...
 
StatusInt SetLineStyleProp (Int32 valueIn, DimStyleProp iProp)
 Change the value of a line style type property. More...
 
StatusInt SetOneUnitProp (UnitDefinitionCR valueIn, DimStyleProp iProp)
 Change the value of a unit type property. More...
 
StatusInt SetTextStyleProp (DgnTextStyleCR valueIn, DimStyleProp iProp)
 Change the value of a text style type property. More...
 
StatusInt SetTemplateFlagProp (UShort valueIn, DimensionType dimensionType, DimStyleProp iProp)
 Change the value of a template flag. More...
 
static DimensionStylePtr GetActive ()
 Get a pointer to the object that holds the active style values. More...
 
static BentleyStatus SetActive (DimensionStyleR dimStyle)
 Overwrite the object that holds the active style values. More...
 
static DimensionStylePtr GetByName (WCharCP name, StyleIteratorMode mode)
 Find a style matching the specified name. More...
 
static bvector< DimensionStylePtr > BuildList (StyleIteratorMode mode)
 Create a list of styles. More...
 
static void AddListener (DimStyleEvents &handler)
 Install a listener that will be notified when styles are add, deleted, or modified and when the active style changes. More...
 
static void DropListener (DimStyleEvents &handler)
 Drop a previously installed listener. More...
 
 DimStyleIterator ()
 Initializes an invalid iterator. More...
 
DimStyleIterator & operator++ ()
 Advances the iterator to the next in collection. More...
 
DimensionStyleP const & operator* () const
 Returns the style value. More...
 
bool operator== (DimStyleIterator const &) const
 Test for equality with another iterator. More...
 
bool operator!= (DimStyleIterator const &) const
 Test for inequality with another iterator. More...
 
bool IsValid () const
 Test if the iterator is valid. More...
 
 DimStyleCollection (DgnFileR file)
 Intialize a collection from a file. More...
 
DimStyleIterator begin () const
 Returns an iterator addressing the first element in the collection. More...
 
DimStyleIterator end () const
 Returns an iterator that addresses the location succeeding the last element in collection. More...
 
static DimStylePropMaskPtr CreatePropMask ()
 Create a new DimStylePropMask object. All bits will be off. More...
 
void From (DimStylePropMaskCR)
 Copy the state of another mask into this one. More...
 
bool AnyBitSet () const
 Test if any bits are on in this mask. More...
 
void ClearAllBits ()
 Set all bits to off in this mask. More...
 
StatusInt SetPropertyBit (DimStyleProp dimStyleProp, bool bitValue)
 Set the value of a single property bit. More...
 
StatusInt SetTemplateBit (DimStyleProp dimStyleProp, bool bitValue, DimensionType dimensionType)
 Set the value of a single template bit. More...
 
bool GetPropertyBit (DimStyleProp dimStyleProp) const
 Test the value of a single property bit. More...
 
bool GetTemplateBit (DimStyleProp dimStyleProp, DimensionType dimensionType) const
 Test the value of a single template bit. More...
 
MdlPublic DgnPlatform::ElementId mdlDimStyle_getActiveId (const DgnModelRefP modelRef)
 
DgnDimStyleP mdlDimStyle_getActive ()
 Gets a pointer to the currently active dimension settings. More...
 
ListModelP mdlDimStyle_createListModel (DgnModelRefP sourceModelRef, DgnPlatform::StyleIteratorMode iteratorMode, UInt32 listOptions)
 Creates a list model for dimension styles. More...
 
StatusInt mdlDimStyle_destroyListModel (ListModelP pListModel)
 Destroys a list model that was created by mdlDimStyle_createListModel. More...
 
StatusInt mdlDimStyle_getStyleListModel (ListModel *pListModel, bool bSuppressActiveSettings, bool bSearchLibraries)
 Returns listmodel of the style elements. More...
 

Detailed Description

Find active style tabel entry ID from given model.

Parameters
[in]modelRefmodelref to look for active dimstyle
Returns
dimstyle element ID or INVALID_ELEMENTID

Macro Definition Documentation

#define DIMSTYLE_COMPAREOPTS_Default   (0)
#define DIMSTYLE_COMPAREOPTS_IgnoreUnusedDiffs   (0x0001 << 1)
#define DIMSTYLE_COMPAREOPTS_UserInterface   DIMSTYLE_COMPAREOPTS_IgnoreUnusedDiffs
#define DIMSTYLE_NAMELIST_BoldIfLocal   (0x0001 << 4) /* Styles in active file are bold in list; standard presentation */
#define DIMSTYLE_NAMELIST_DEFAULT   (DIMSTYLE_NAMELIST_BoldIfLocal | DIMSTYLE_NAMELIST_UseSortFunc)
#define DIMSTYLE_NAMELIST_StyleNone   (0x0001 << 0) /* Must add style (none). */
#define DIMSTYLE_NAMELIST_StylesOnly   (0x0001 << 1) /* No style (none). */
#define DIMSTYLE_NAMELIST_UseSortFunc   (0x0001 << 5) /* Use the internal sort function that puts None at the top and sorts alphabetically */

Typedef Documentation

typedef DimStyleIterator const_iterator
typedef struct DgnPlatform :: DimensionStyle const* DimensionStyleCP
typedef struct DgnPlatform :: DimensionStyle const& DimensionStyleCR
typedef struct DgnPlatform :: DimensionStyle* DimensionStyleP
typedef RefCountedPtr<DimensionStyle> DimensionStylePtr
typedef struct DgnPlatform :: DimensionStyle & DimensionStyleR
typedef struct DgnPlatform :: DimStyleIterator const* DimStyleIteratorCP
typedef struct DgnPlatform :: DimStyleIterator const& DimStyleIteratorCR
typedef struct DgnPlatform :: DimStyleIterator* DimStyleIteratorP
typedef RefCountedPtr<DimStyleIterator> DimStyleIteratorPtr
typedef struct DgnPlatform :: DimStyleIterator & DimStyleIteratorR
typedef struct DgnPlatform :: DimStylePropMask const* DimStylePropMaskCP
typedef struct DgnPlatform :: DimStylePropMask const& DimStylePropMaskCR
typedef struct DgnPlatform :: DimStylePropMask* DimStylePropMaskP
typedef RefCountedPtr<DimStylePropMask> DimStylePropMaskPtr
typedef struct DgnPlatform :: DimStylePropMask & DimStylePropMaskR
typedef const_iterator iterator

only const iteration is possible

typedef DimStylePropMaskPtr PropertyMaskPtr

Function Documentation

virtual void _OnDimStyleChange ( DimensionStyleCP  before,
DimensionStyleCP  after,
StyleEventType  type,
StyleEventSource  source 
)
pure virtual
BentleyStatus Add ( DgnFileP  file = 0)

Add this DimensionStyle to a DgnFile.

Will fail if there is already a style with the same name.

Parameters
[in]fileThe file in which to write the style. If NULL, the style will be written to the file stored in the style object.
Remarks
If the style is written to a file different than the file stored in the style object, then the style object will be converted to the new file.
Returns
SUCCESS if the style was written.
static void AddListener ( DimStyleEvents handler)
static

Install a listener that will be notified when styles are add, deleted, or modified and when the active style changes.

See also
DimensionStyle::DropListener
Remarks
This method is only available to code that links with ustation.dll
Required Library : mdlbltin.lib
bool AnyBitSet ( ) const

Test if any bits are on in this mask.

DimStyleIterator begin ( ) const

Returns an iterator addressing the first element in the collection.

static bvector<DimensionStylePtr> BuildList ( DgnFileR  file)
static

Create a list of all the styles in the specified file.

static bvector<DimensionStylePtr> BuildList ( StyleIteratorMode  mode)
static

Create a list of styles.

This method can search in the active file or the current dgnlib path or both. Duplicates will be removed and styles will be sorted as appropiate for the user interface.

Remarks
This method is only available to code that links with ustation.dll
Required Library : mdlbltin.lib
void ClearAllBits ( )

Set all bits to off in this mask.

DimStylePropMaskPtr Compare ( DimensionStyleCR  otherStyle,
UInt32  compareOpts = (0) 
) const

Compare this style object with another one.

Parameters
[in]otherStyleThe other style.
[in]compareOptsOptions that control the comparison.
Remarks
The following compare options are supported:
  • DIMSTYLE_COMPAREOPTS_Default Compare every property.
  • DIMSTYLE_COMPAREOPTS_IgnoreUnusedDiffs Ignore those properties that are 'unused'.
An unused property will not affect dimensions placed with this style. For example, if the style's extension color flag is OFF, that means the dimension's extension color will come from the header color. In that case, the style's extension color value is unused.
Returns
A mask with 'on' bits representing each difference between the two styles. To quickly test if any difference exists use DimStylePropMask::AnyBitSet
StatusInt ConvertToFile ( DgnFileR  file)

Change the context of this style to another DgnFile.

DimensionStylePtr Copy ( ) const

Make a copy of this style object.

void CopyValues ( DimensionStyleCR  source)

Copy all the properties from another style object into this one.

static DimensionStylePtr Create ( WCharCP  name,
DgnFileR  file 
)
static

Create a new DimensionStyle object. The style is not be persisted automatically.

static DimStylePropMaskPtr CreatePropMask ( )
static

Create a new DimStylePropMask object. All bits will be off.

static BentleyStatus Delete ( WCharCP  name,
DgnFileR  file 
)
static

Deletes a dimension style from a dgn file.

This method will fail if any elements refer to the style.

Parameters
[in]nameThe name of the style to delete.
[in]fileThe file from which to delete the style.
Returns
SUCCESS if the style was removed.
See also
HasDependents
RemapDependents
DimStyleCollection ( DgnFileR  file)

Intialize a collection from a file.

Parameters
fileReference to the file on which to get the collection from
DimStyleIterator ( )

Initializes an invalid iterator.

static void DropListener ( DimStyleEvents handler)
static

Drop a previously installed listener.

After this the listener will no longer receive notifications.

See also
DimensionStyle::AddListener
Remarks
This method is only available to code that links with ustation.dll
Required Library : mdlbltin.lib
DimStyleIterator end ( ) const

Returns an iterator that addresses the location succeeding the last element in collection.

void From ( DimStylePropMaskCR  )

Copy the state of another mask into this one.

StatusInt GetAccuracyProp ( byte valueOut,
DimStyleProp  iProp 
) const

Get the value of an accuracy type property.

static DimensionStylePtr GetActive ( )
static

Get a pointer to the object that holds the active style values.

This values held by this object are used by all the placement tools.

See also
DimensionStyle::SetActive
Remarks
This method is only available to code that links with ustation.dll
Required Library : mdlbltin.lib
StatusInt GetBooleanProp ( bool &  valueOut,
DimStyleProp  iProp 
) const

Get the value of a boolean type property.

static DimensionStylePtr GetByID ( ElementId  elemID,
DgnFileR  file 
)
static

Find an existing persistent Named DimensionStyle.

static DimensionStylePtr GetByName ( WCharCP  name,
DgnFileR  file 
)
static

Find an existing persistent Named DimensionStyle.

static DimensionStylePtr GetByName ( WCharCP  name,
StyleIteratorMode  mode 
)
static

Find a style matching the specified name.

This method can search in the active file or the current dgnlib path or both.

Remarks
This method is only available to code that links with ustation.dll
Required Library : mdlbltin.lib
StatusInt GetCharProp ( UShort valueOut,
DimStyleProp  iProp 
) const

Get the value of a char type property.

StatusInt GetColorProp ( UInt32 valueOut,
DimStyleProp  iProp 
) const

Get the value of an accuracy type property.

StatusInt GetDistanceProp ( double &  valueOut,
DimStyleProp  iProp,
DgnModelP  dgnModel 
) const

Get the value of a distance type property.

StatusInt GetDoubleProp ( double &  valueOut,
DimStyleProp  iProp 
) const

Get the value of a double type property.

DgnFileP GetFile ( ) const

Get the file which serves as the context for this style.

StatusInt GetFontProp ( UInt32 valueOut,
DimStyleProp  iProp 
) const

Get the value of a font type property.

ElementId GetID ( ) const

Get the id of this style.

StatusInt GetIntegerProp ( int &  valueOut,
DimStyleProp  iProp 
) const

Get the value of an integer type property.

StatusInt GetLevelProp ( LevelId valueOut,
DimStyleProp  iProp 
) const

Get the value of a level type property.

StatusInt GetLineStyleProp ( Int32 valueOut,
DimStyleProp  iProp 
) const

Get the value of a linestyle type property.

WStringCR GetName ( ) const

Get the name of this style.

StatusInt GetOneUnitProp ( UnitDefinitionR  valueOut,
DimStyleProp  iProp 
) const

Get the value of a unit type property. To change a unit property use SetUnitsProp().

bool GetPropertyBit ( DimStyleProp  dimStyleProp) const

Test the value of a single property bit.

static DimensionStylePtr GetSettings ( DgnFileR  file)
static

Get the active dimension settings from a file.

StatusInt GetStringProp ( WStringR  valueOut,
DimStyleProp  iProp 
) const

Get the value of a string type property.

bool GetTemplateBit ( DimStyleProp  dimStyleProp,
DimensionType  dimensionType 
) const

Test the value of a single template bit.

StatusInt GetTemplateFlagProp ( UShort valueOut,
DimensionType  dimensionType,
DimStyleProp  iProp 
) const

Get the value of a template flag.

UInt32 GetTextStyleId ( ) const

Get the id of the TextStyle used by this style. If this style does not refer to a TextStyle this method will return zero.

StatusInt GetTextStyleProp ( DgnTextStylePtr valueOut,
DimStyleProp  iProp 
) const

Get the value of a text style type property.

StatusInt GetUnitsProp ( UnitDefinitionP  master,
UnitDefinitionP  sub,
DimStyleProp  iProp 
) const

Get the value of a units type property.

double GetUorScale ( DgnModelR  destModel) const

Obtain a scale factor needed to interpret style distance properties.

Parameters
[in]destModeldesired context for distance value. For distance properties, the method GetDoubleProp returns values in terms of the resolution of the default model of the style's file. In order to use that value in a different model it should be multiplied be the uor scale.
StatusInt GetWeightProp ( UInt32 valueOut,
DimStyleProp  iProp 
) const

Get the value of a weight type property.

bool HasDependants ( ) const

Tests whether any elements store a persistent reference to the style.

Returns
true if there are dependents.
bool IsValid ( ) const

Test if the iterator is valid.

ListModelP mdlDimStyle_createListModel ( DgnModelRefP  sourceModelRef,
DgnPlatform::StyleIteratorMode  iteratorMode,
UInt32  listOptions 
)

Creates a list model for dimension styles.

The values of the cells are the style's names.

Parameters
[in]sourceModelRefSpecifies the preferred file for traversal. If non-NULL the styles from this file will be added to the list model.
[in]iteratorModeUsed to specify additional files from which to gather styles. Pass StyleIteratorMode::Invalid to traverse the preferred file only.
[in]listOptionsOptions used to control the list, see remarks.
Remarks
The following constants should be used to specify the list options parameter:
  • DIMSTYLE_NAMELIST_StyleNone - Must add style (none).
  • DIMSTYLE_NAMELIST_StylesOnly - Do not add style (none).
  • DIMSTYLE_NAMELIST_BoldIfLocal - Styles in active style are bold in list.
  • DIMSTYLE_NAMELIST_UseSortFunc - Use the internal sort function.
Returns
list model that was created. Should be freed by calling mdlDimStyle_destroyListModel.
Remarks
This is a convenience function that internally uses DimStyleLibraryCollection.
StatusInt mdlDimStyle_destroyListModel ( ListModelP  pListModel)

Destroys a list model that was created by mdlDimStyle_createListModel.

Parameters
[in]pListModellist model to be desctroyed
Returns
status
DgnDimStyleP mdlDimStyle_getActive ( )

Gets a pointer to the currently active dimension settings.

Returns
Pointer to settings or NULL
Remarks
Callers must NOT free the memory associated with the returned pointer.
MdlPublic DgnPlatform::ElementId mdlDimStyle_getActiveId ( const DgnModelRefP  modelRef)
StatusInt mdlDimStyle_getStyleListModel ( ListModel *  pListModel,
bool  bSuppressActiveSettings,
bool  bSearchLibraries 
)

Returns listmodel of the style elements.

Parameters
pListModel<=>
bSuppressActiveSettings=> true if active settings option is include
Returns
SUCCESS
bool operator!= ( DimStyleIterator const &  ) const

Test for inequality with another iterator.

DimensionStyleP const& operator* ( ) const

Returns the style value.

DimStyleIterator& operator++ ( )

Advances the iterator to the next in collection.

bool operator== ( DimStyleIterator const &  ) const

Test for equality with another iterator.

static BentleyStatus RemapDependents ( WCharCP  destStyle,
WCharCP  sourceStyle,
DgnFileR  file 
)
static

Remap all the elements that reference one style to different style.

Parameters
destStyleIN remap to this style.
sourceStyleIN remap from this style.
fileIN file in which to search.
BentleyStatus Replace ( WCharCP  oldName = 0,
DgnFileP  file = 0 
)

Replace an existing persistent DimensionStyle in a DgnFile.

Will fail if there is not already a style with the same name.

Parameters
[in]oldNameThe name of the style to replace. If NULL, the style will be overwrite the style with the same name as the style object.
[in]fileThe file in which to write the style. If NULL, the style will be written to the file stored in the style object.
Remarks
If the style is written to a file different than the file stored in the style object, then the style object will be converted to the new file.
Returns
SUCCESS if the style was written.
static BentleyStatus ReplaceSettings ( DimensionStyleR  settings,
DgnFileR  file 
)
static

Overwrite the active dimension settings from a file.

StatusInt SetAccuracyProp ( byte  valueIn,
DimStyleProp  iProp 
)

Change the value of an accuracy type property.

static BentleyStatus SetActive ( DimensionStyleR  dimStyle)
static

Overwrite the object that holds the active style values.

This values held by this object are used by all the placement tools.

See also
DimensionStyle::GetActive
Remarks
This method is only available to code that links with ustation.dll
Required Library : mdlbltin.lib
StatusInt SetBooleanProp ( bool  valueIn,
DimStyleProp  iProp 
)

Change the value of a boolean type property.

StatusInt SetCharProp ( UShort  valueIn,
DimStyleProp  iProp 
)

Change the value of a char type property.

StatusInt SetColorProp ( UInt32  valueIn,
DimStyleProp  iProp 
)

Change the value of a color type property.

StatusInt SetDistanceProp ( double  valueIn,
DimStyleProp  iProp,
DgnModelP  dgnModel 
)

Change the value of a distance type property.

StatusInt SetDoubleProp ( double  valueIn,
DimStyleProp  iProp 
)

Change the value of a double type property.

StatusInt SetFontProp ( UInt32  valueIn,
DimStyleProp  iProp 
)

Change the value of a font type property.

StatusInt SetIntegerProp ( int  valueIn,
DimStyleProp  iProp 
)

Change the value of an integer type property.

StatusInt SetLevelProp ( LevelId  valueIn,
DimStyleProp  iProp 
)

Change the value of a level type property.

StatusInt SetLineStyleProp ( Int32  valueIn,
DimStyleProp  iProp 
)

Change the value of a line style type property.

BentleyStatus SetName ( WCharCP  newName)

Set the name of this style.

StatusInt SetOneUnitProp ( UnitDefinitionCR  valueIn,
DimStyleProp  iProp 
)

Change the value of a unit type property.

StatusInt SetPropertyBit ( DimStyleProp  dimStyleProp,
bool  bitValue 
)

Set the value of a single property bit.

StatusInt SetStringProp ( WCharCP  valueIn,
DimStyleProp  iProp 
)

Change the value of a string type property.

StatusInt SetTemplateBit ( DimStyleProp  dimStyleProp,
bool  bitValue,
DimensionType  dimensionType 
)

Set the value of a single template bit.

StatusInt SetTemplateFlagProp ( UShort  valueIn,
DimensionType  dimensionType,
DimStyleProp  iProp 
)

Change the value of a template flag.

StatusInt SetTextStyleProp ( DgnTextStyleCR  valueIn,
DimStyleProp  iProp 
)

Change the value of a text style type property.

StatusInt SetUnitsProp ( UnitDefinitionCR  master,
UnitDefinitionCR  sub,
DimStyleProp  iProp 
)

Change the value of a units type property. The master unit must be larger than or the same size as the sub unit.

StatusInt SetWeightProp ( UInt32  valueIn,
DimStyleProp  iProp 
)

Change the value of a weight type property.


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