Rhino C++ API  8.14
Public Types | Public Member Functions | Public Attributes | Friends | List of all members
CRhinoDimStyleTable Class Reference

#include <rhinoSdkDimStyle.h>

Inheritance diagram for CRhinoDimStyleTable:
ON_SimpleArray< CRhinoDimStyle * >

Public Types

enum  : unsigned int { DefaultDimStyleCount = 12 }
 

Public Member Functions

 CRhinoDimStyleTable (CRhinoDoc &)
 
 ~CRhinoDimStyleTable ()
 
int AddDimStyle (bool bReference)
 
int AddDimStyle (const ON_DimStyle &style, bool bReference)
 
int CreateDimStyle (const ON_DimStyle &dimstyle, unsigned int worksession_ref_model_sn, unsigned int linked_idef_sn)
 
const CRhinoDimStyleCurrentDimStyle () const
 
ON_UUID CurrentDimStyleId () const
 
int CurrentDimStyleIndex () const
 
const class CRhinoDimStyleDefaultDimStyleFromId (ON_UUID dimension_style_id) const
 
const class CRhinoDimStyleDefaultDimStyleFromIndex (int dimension_style_index) const
 
bool DeleteDimStyle (int style_index, bool bQuiet)
 
bool DeleteDimStyles (int style_index_count, const int *style_index, bool bQuiet)
 
const CRhinoDimStyleDimStyle (const ON_ComponentManifestItem &item) const
 
int DimStyleCount () const
 
CRhinoDocDocument () const
 
double DocumentModelViewTextScale () const
 
int FindDimStyleFromContentHash (ON_SHA1_Hash dim_style_content_hash, bool bSearchDefaultDimStyles, bool bSearchDeletedDimStyles, int not_found_return_value) const
 
int FindDimStyleFromFont (const ON_Font &font, double model_space_text_scale) const
 
int FindDimStyleFromFont (const ON_Font &font, double model_space_text_scale, bool bCreateIfNotFound)
 
int FindDimStyleFromFont (const ON_Font &font, double model_space_text_scale, const ON_DimStyle *template_style, bool bCreateIfNotFound)
 
int FindDimStyleFromFont (const ON_Font *font, double model_space_text_scale, bool bCreateIfNotFound)
 
int FindDimStyleFromId (ON_UUID dim_style_id, bool bSearchDefaultDimStyles, bool bSearchDeletedDimStyles, int not_found_return_value) const
 
int FindDimStyleFromManagedFontSerialNumber (unsigned int managed_font_serial_number, double model_space_text_scale) const
 
int FindDimStyleFromName (const ON_NameHash &dim_style_name_hash, bool bSearchSystemDimStyles, int not_found_return_value) const
 
int FindDimStyleFromName (const wchar_t *dim_style_name, bool bSearchSystemDimStyles, int not_found_return_value) const
 
int FindParent (int childindex)
 bogs del with missing const More...
 
int FindParent (int childindex) const
 
unsigned int GetDefaultDimensionStyles (ON_SimpleArray< const CRhinoDimStyle * > &default_dimension_style_list) const
 
unsigned int GetDefaultDimensionStyles (size_t default_dimension_style_list_capacity, const CRhinoDimStyle **default_dimension_style_list) const
 
void GetDefaultDimStyleProperties (ON_DimStyle &style) const
 
void GetSortedList (ON_SimpleArray< const CRhinoDimStyle * > &sorted_list, bool bIgnoreDeleted, bool bIgnoreReference) const
 
void GetSortedList (ON_SimpleArray< const CRhinoDimStyle * > &sorted_list, bool bIgnoreDeleted=false) const
 
void GetUnusedDimStyleName (const wchar_t *root_name, ON_wString &result) const
 
void GetUnusedDimStyleName (ON_wString &result) const
 
void ListTable (ON_TextLog &text_log, unsigned int level_of_detail) const
 
bool ModifyDimStyle (const ON_DimStyle &style, int style_index, bool bQuiet=false)
 
const CRhinoDimStyleoperator[] (int style_index) const
 
int OverrideDimStyle (const ON_DimStyle &new_dimstyle, int dimstyle_index)
 
bool SetCurrentDimStyleIndex (int style_index, bool bQuiet=false)
 
void SetRemapIndex (int style_index, int remap_index)
 
void SetUnusedDimStyleName (ON_DimStyle &dim_style) const
 
void Sort (int(*compar)(const CRhinoDimStyle *, const CRhinoDimStyle *, void *), int(*cull)(const CRhinoDimStyle *, void *), void *p)
 
const class CRhinoDocTableReferenceTableReference () const
 
bool UndeleteDimStyle (int layer_index)
 
bool UndoModifyDimStyle (int dimstyle_index, unsigned int ur_sn=0)
 

Public Attributes

const CRhinoDimStyleDefaultDimensionStyle
 Rhino 6 default dimension styles. More...
 
const CRhinoDimStyleDefaultFeetDecimal
 Rhino 7 new default dimension styles. More...
 
const CRhinoDimStyleDefaultFeetEngrave
 index = -10; More...
 
const CRhinoDimStyleDefaultFootInchArchitecture
 index = -4; More...
 
const CRhinoDimStyleDefaultInchDecimal
 index = -2; More...
 
const CRhinoDimStyleDefaultInchFractional
 index = -3; More...
 
const CRhinoDimStyleDefaultMillimeterArchitecture
 index = -7; More...
 
const CRhinoDimStyleDefaultMillimeterEngrave
 index = -11; More...
 
const CRhinoDimStyleDefaultMillimeterLarge
 index = -6; More...
 
const CRhinoDimStyleDefaultMillimeterSmall
 index = -5; More...
 
const CRhinoDimStyleDefaultModelUnitsDecimal
 index = -9; More...
 
const CRhinoDimStyleDefaultModelUnitsEngrave
 index = -12; More...
 

Friends

class CRhinoDoc
 
class CRhinoRead3dmHelper
 

Detailed Description

CRhinoDimStyleTable class - A list of DimensionStyle settings groups The base class is private because this dynamic array must be accessed and modified in a controlled way to insure the document is valid.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum : unsigned int
Enumerator
DefaultDimStyleCount 

Constructor & Destructor Documentation

◆ CRhinoDimStyleTable()

CRhinoDimStyleTable::CRhinoDimStyleTable ( CRhinoDoc )

◆ ~CRhinoDimStyleTable()

CRhinoDimStyleTable::~CRhinoDimStyleTable ( )

Member Function Documentation

◆ AddDimStyle() [1/2]

int CRhinoDimStyleTable::AddDimStyle ( bool  bReference)

Description: Adds a new dim style with default definition to the dim style table.

Parameters: bReference - [in] true if this dim style is a reference style. Reference dim styles are not saved in files.

Returns: index of new dim style

Remarks: In some cases, calling AddDimStyle() can cause the memory references previously returned by operator[] and CurrentDimStyle() to become invalid.

◆ AddDimStyle() [2/2]

int CRhinoDimStyleTable::AddDimStyle ( const ON_DimStyle style,
bool  bReference 
)

Description: Adds a new dim style with specified definition to the dim style table.

Parameters: style - [in] definition of new dim style. The information in style is copied. If style.Name() is empty the a unique name of the form "DimStyle 01" will be automatically created.

bReference - [in] true if this layer is a reference dim style. Reference dim styles are not saved in files.

Returns: @untitled table >=0 index of new dim style -1 dim style not added because a dim style with that name already exists.

Remarks: In some cases, calling AddDimStyle() can cause the memory references previously returned by operator[] and CurrentDimStyle() to become invalid.

◆ CreateDimStyle()

int CRhinoDimStyleTable::CreateDimStyle ( const ON_DimStyle dimstyle,
unsigned int  worksession_ref_model_sn,
unsigned int  linked_idef_sn 
)

Description: Basic tool used to create a new dimstyle with specified definition to the dimstyle table. The AddDimStyle() functions all use CreateDimStyle() when a new dimstyle needs to be added to the dimstyle table.

Parameters: dimstyle - [in] definition of new dimstyle. The information in dimstyle is copied. If dimstyle.DimStyleName() is empty the a unique name of the form "DimStyle 01" will be automatically created.

worksession_ref_model_sn - [in] 0: dimstyle is not a reference layer 1: dimstyle is a reference dimstyle but not part of a worksession reference file 2-1000: reserved for future use >1000: worksession reference file serial number

linked_idef_sn - [in] 0: dimstyle is not from a liked instance definition 1-1000: reserved for future use >1000: dimstyle instance definition serial number

Returns: @untitled table >=0 index of new dimstyle -1 dimstyle not added because a dimstyle with that name already exists.

◆ CurrentDimStyle()

const CRhinoDimStyle& CRhinoDimStyleTable::CurrentDimStyle ( ) const

Description: At all times, there is a "current" dim style. Unless otherwise specified, new dimension objects are assigned the current dim style. The current dim style is never deleted.

Returns: Reference to the current dim style. Note that this reference may become invalid after a call to AddDimStyle().

◆ CurrentDimStyleId()

ON_UUID CRhinoDimStyleTable::CurrentDimStyleId ( ) const

◆ CurrentDimStyleIndex()

int CRhinoDimStyleTable::CurrentDimStyleIndex ( ) const

Description: At all times, there is a "current" dim style. Unless otherwise specified, new dimension objects are assigned to the current dim style. The current dim style is never deleted.

Returns: Zero based dim style index of the current dim style.

◆ DefaultDimStyleFromId()

const class CRhinoDimStyle* CRhinoDimStyleTable::DefaultDimStyleFromId ( ON_UUID  dimension_style_id) const

Description: Get one of the default dimension styles from an id value. Parameters: dimension_style_id - [in] Returns: A pointer to the default dimension style with Id() = dimension_style_id or nullptr if dimension_style_id does not identify a default dimstyle.

◆ DefaultDimStyleFromIndex()

const class CRhinoDimStyle* CRhinoDimStyleTable::DefaultDimStyleFromIndex ( int  dimension_style_index) const

Description: Get one of the default dimension styles from an index value. Parameters: dimension_style_index - [in] Returns: A pointer to the default dimension style with Index() = dimension_style_index or nullptr if dimension_style_index does not identify a default dimstyle.

◆ DeleteDimStyle()

bool CRhinoDimStyleTable::DeleteDimStyle ( int  style_index,
bool  bQuiet 
)

Description: Deletes dim style

Parameters: style_index - [in] zero based index of style to delete. This must be in the range 0 <= style_index < DimStyleCount(). bQuiet - [in] If true, no warning message box appears if a layer the dim style cannot be deleted because it is the current dim style or it contains active geometry.

Returns: true if successful. false if style_index is out of range or the the dim style cannot be deleted because it is the current dim style or because it dim style contains active geometry.

◆ DeleteDimStyles()

bool CRhinoDimStyleTable::DeleteDimStyles ( int  style_index_count,
const int *  style_index,
bool  bQuiet 
)

Description: Deletes multiple dim styles

Parameters: style_index_count - [in] length of style_index[] array. style_index - [in] array zero based indices of dim styles to delete. The indices must be in the range 0 <= style_index < DimStyleCount(). bQuiet - [in] If true, no warning message box appears if a dim style cannot be deleted because it is the current dim style or it contains active geometry.

Returns: true if successful. false if style_index is out of range or the the dim style cannot be deleted because it is the current style or because there is geometry referencing this dim style.

◆ DimStyle()

const CRhinoDimStyle* CRhinoDimStyleTable::DimStyle ( const ON_ComponentManifestItem item) const

◆ DimStyleCount()

int CRhinoDimStyleTable::DimStyleCount ( ) const

Returns: Number of styles in the dim style table, including deleted styles.

◆ Document()

CRhinoDoc& CRhinoDimStyleTable::Document ( ) const

◆ DocumentModelViewTextScale()

double CRhinoDimStyleTable::DocumentModelViewTextScale ( ) const

Returns: The current document model space scale setting or ON_UNSET_VALUE if it is not in use or set.

◆ FindDimStyleFromContentHash()

int CRhinoDimStyleTable::FindDimStyleFromContentHash ( ON_SHA1_Hash  dim_style_content_hash,
bool  bSearchDefaultDimStyles,
bool  bSearchDeletedDimStyles,
int  not_found_return_value 
) const

Description: Find the most appropriate dimension style with the specified content hash. Parameters: dim_style_content_hash - [in] ON_DimStyle.ContentHash() value.

◆ FindDimStyleFromFont() [1/4]

int CRhinoDimStyleTable::FindDimStyleFromFont ( const ON_Font font,
double  model_space_text_scale 
) const

Parameters: font - [in] model_space_text_scale - [in] If model_space_text_scale is not valid or not positive, then CRhinoDimStyleTable.DocumentModelViewTextScale() is used. The DimScale() property must be equal to model_space_text_scale.

◆ FindDimStyleFromFont() [2/4]

int CRhinoDimStyleTable::FindDimStyleFromFont ( const ON_Font font,
double  model_space_text_scale,
bool  bCreateIfNotFound 
)

Description: Look for a dimstyle using the specified font. If one does not exist, create a dimstyle. Parameters: font - [in] model_space_text_scale - [in] If model_space_text_scale is not valid or not positive, then CRhinoDimStyleTable.DocumentModelViewTextScale() is used. The DimScale() property must be equal to model_space_text_scale. bCreateIfNotFound - [in] If a dimstyle using the font is not found, a new dimstyle is created by copying the default dimstyle and setting the font.

◆ FindDimStyleFromFont() [3/4]

int CRhinoDimStyleTable::FindDimStyleFromFont ( const ON_Font font,
double  model_space_text_scale,
const ON_DimStyle template_style,
bool  bCreateIfNotFound 
)

Description: Look for a dimstyle using the specified font. If one does not exist, create a dimstyle. Parameters: font - [in] model_space_text_scale - [in] If model_space_text_scale is not valid or not positive, then CRhinoDimStyleTable.DocumentModelViewTextScale() is used. The DimScale() property must be equal to model_space_text_scale. template_style - [in] If template_style is non-null, the style it points to will be used as the starting point if a new style is made, otherwise, the default style is used. bCreateIfNotFound - [in] If a dimstyle using the font is not found, a new dimstyle is created by copying the template_style, if it is non-null, or the default style, and setting the font.

◆ FindDimStyleFromFont() [4/4]

int CRhinoDimStyleTable::FindDimStyleFromFont ( const ON_Font font,
double  model_space_text_scale,
bool  bCreateIfNotFound 
)

Description: Look for a dimstyle using the specified font. If one does not exist, create a dimstyle. Parameters: font - [in] model_space_text_scale - [in] If model_space_text_scale is not valid or not positive, then CRhinoDimStyleTable.DocumentModelViewTextScale() is used. The DimScale() property must be equal to model_space_text_scale. bCreateIfNotFound - [in] If a dimstyle using the font is not found, a new dimstyle is created by copying the default dimstyle and setting the font.

◆ FindDimStyleFromId()

int CRhinoDimStyleTable::FindDimStyleFromId ( ON_UUID  dim_style_id,
bool  bSearchDefaultDimStyles,
bool  bSearchDeletedDimStyles,
int  not_found_return_value 
) const

Description: Search for a dimension style with a matching id. Parameters: dim_style_id - [in] bSearchDefaultDimStyles - [in] If true, the system default dimension styles (DefaultDimensionStyle, DefaultInchDecimal, ..., DefaultMillimeterArchitecture) are included in the search. If you are searching for a dimension style to use as it exists, bSearchDefaultDimStyles should be true. If you are searching for a dimension style to modify, bSearchDefaultDimStyles should be false because the default dimension styles cannot be modified. bSearchDeletedDeletedDimStyles - [in] If true, deleted dimension styles are included in the search. not_found_return_value - [in] Value to return if no dimension style has a matching id. Depending on what should happen if the id is not found, CurrentDimStyleIndex(), DefaultDimensionStyle.Index() and ON_UNSET_INT_INDEX are common choices for this value. Returns: The index of the matching dimension style is returned. If no match is found, then not_found_return_value is returned.

◆ FindDimStyleFromManagedFontSerialNumber()

int CRhinoDimStyleTable::FindDimStyleFromManagedFontSerialNumber ( unsigned int  managed_font_serial_number,
double  model_space_text_scale 
) const

Description: Look for a dimstyle using the specified font. If one does not exist, create a dimstyle. Parameters: managed_font_serial_number - [in] The value returned by ON_Font.ManagedFontSerialNumber(). model_space_text_scale - [in] If model_space_text_scale is not valid or not positive, then CRhinoDimStyleTable.DocumentModelViewTextScale() is used. The DimScale() property must be equal to model_space_text_scale.

◆ FindDimStyleFromName() [1/2]

int CRhinoDimStyleTable::FindDimStyleFromName ( const ON_NameHash dim_style_name_hash,
bool  bSearchSystemDimStyles,
int  not_found_return_value 
) const

◆ FindDimStyleFromName() [2/2]

int CRhinoDimStyleTable::FindDimStyleFromName ( const wchar_t *  dim_style_name,
bool  bSearchSystemDimStyles,
int  not_found_return_value 
) const

Description: Search for a dimension style with a matching name. Parameters: dim_style_name - [in] bSearchSystemDimStyles - [in] If true, the system default dimension styles (DefaultDimensionStyle, DefaultInchDecimal, ..., DefaultMillimeterArchitecture) are included in the search. If you are searching for a dimension style to use as it exists, bSearchDefaultDimStyles should be true. If you are searching for a dimension style to modify, bSearchDefaultDimStyles should be false because the default dimension styles cannot be modified. not_found_return_value - [in] Value to return if no dimension style has a matching name. Depending on what should happen if the name is not found, CurrentDimStyleIndex(), DefaultDimensionStyle.Index() and ON_UNSET_INT_INDEX are common choices for this value. Returns: The index of the matching dimension style is returned. If no match is found, then not_found_return_value is returned.

◆ FindParent() [1/2]

int CRhinoDimStyleTable::FindParent ( int  childindex)

bogs del with missing const

◆ FindParent() [2/2]

int CRhinoDimStyleTable::FindParent ( int  childindex) const

Description: Finds a dimstyle's parent if there is one

Parameters: childindex - [in] Index of the child dimstyle for which to find the parent

Returns: Index of the parent or -1 if there isn't one

Remarks: Won't return the index of a deleted dimstyle

◆ GetDefaultDimensionStyles() [1/2]

unsigned int CRhinoDimStyleTable::GetDefaultDimensionStyles ( ON_SimpleArray< const CRhinoDimStyle * > &  default_dimension_style_list) const

Description: Get a list of the default dimension styles. Returns: Number of dimension styles added to the list. Remarks: The dimension style table has CRhinoDimStyleTable::DefaultDimStyleCount default dimension styles.

◆ GetDefaultDimensionStyles() [2/2]

unsigned int CRhinoDimStyleTable::GetDefaultDimensionStyles ( size_t  default_dimension_style_list_capacity,
const CRhinoDimStyle **  default_dimension_style_list 
) const

Description: Get a list of the default dimension styles. Parameters: default_dimension_style_list_capacity - [in] Capacity of the default_dimension_style_list[] array. default_dimension_style_list - [out] List of default dimension styles. Returns: Number of dimension styles added to the list. Remarks: The dimension style table has CRhinoDimStyleTable::DefaultDimStyleCount default dimension styles.

◆ GetDefaultDimStyleProperties()

void CRhinoDimStyleTable::GetDefaultDimStyleProperties ( ON_DimStyle style) const

Description: Initializes an CRhinoDimStyle with the current default dimension style properties.

Parameters: style - [out] properties returned here

Remarks: The default properties are:

◆ GetSortedList() [1/2]

void CRhinoDimStyleTable::GetSortedList ( ON_SimpleArray< const CRhinoDimStyle * > &  sorted_list,
bool  bIgnoreDeleted,
bool  bIgnoreReference 
) const

Description: Gets an array of pointers to dimstyles whose value of CRhinoDimStyle.m_sort_index != -1. The returned list is sorted by the value of CRhinoDimStyle.m_sort_index.

Parameters: sorted_list - [out] this array is returned with length <= DimStyleCount() and is sorted by the values of CRhinoDimStyle::m_sort_index.

bIgnoreDeleted - [in] true means don't include deleted dimstyles.

bIgnoreDeleted - [in] true means don't include referenced dimstyles. A "referenced" dimstyle is one from a worksession reference model or a linked instance definition model.

Remarks: Use Sort() to set the values of m_sort_index.

◆ GetSortedList() [2/2]

void CRhinoDimStyleTable::GetSortedList ( ON_SimpleArray< const CRhinoDimStyle * > &  sorted_list,
bool  bIgnoreDeleted = false 
) const

◆ GetUnusedDimStyleName() [1/2]

void CRhinoDimStyleTable::GetUnusedDimStyleName ( const wchar_t *  root_name,
ON_wString result 
) const

◆ GetUnusedDimStyleName() [2/2]

void CRhinoDimStyleTable::GetUnusedDimStyleName ( ON_wString result) const

Description: Gets unsed layer name used as default when creating new layers

Parameters: result - [out] this is the wString which receives new name

◆ ListTable()

void CRhinoDimStyleTable::ListTable ( ON_TextLog text_log,
unsigned int  level_of_detail 
) const

◆ ModifyDimStyle()

bool CRhinoDimStyleTable::ModifyDimStyle ( const ON_DimStyle style,
int  style_index,
bool  bQuiet = false 
)

Description: Modify dim style settings

Parameters: style - [in] new settings. This information is copied. style_index - [in] zero based index of style to set. This must be in the range 0 <= style_index < DimStyleCount(). bQuiet - [in] if true, information message boxes pop up when illegal changes are attempted.

Returns: true if successful. false if style_index is out of range.

◆ operator[]()

const CRhinoDimStyle& CRhinoDimStyleTable::operator[] ( int  style_index) const

Description: Conceptually, the dim style table is an array of DimStyleCount() dim styles. The operator[] can be used to get individual dim styles. A dim style is either active or deleted and this state is reported by CRhinoDimStyle::IsDeleted().

Parameters: style_index - zero based array index

Returns: Reference to the style. If style_index is out of range, the current style is returned. Note that this reference may become invalid after AddDimStyle() is called.

◆ OverrideDimStyle()

int CRhinoDimStyleTable::OverrideDimStyle ( const ON_DimStyle new_dimstyle,
int  dimstyle_index 
)

Description: Override fields in an existing dimstyle

Parameters: new_style - [in] new settings - This dimstyle must have at least one field overridden, with the field override flag set and the override count set correctly. Use ON_DimStyle::SetFieldOverride() to set the flag dimstyle_index - [in] zero based index of style to override. This must be in the range 0 <= style_index < DimStyleCount().

Comments: The dimstyle in the table at dimstyle_index becomes the parent. new_dimstyle is copied, its name is set to a derivative of the name of the parent and the parent id is set to the parent's id The fields in the copied style are set an it is added to the table Returns: index (>=0) of the newly added style if successful. -1 if something goes wrong.

◆ SetCurrentDimStyleIndex()

bool CRhinoDimStyleTable::SetCurrentDimStyleIndex ( int  style_index,
bool  bQuiet = false 
)

Description: At all times, there is a "current" dim style. Unless otherwise specified, new dim objects are assigned to the current dim style. The current dim style is never deleted.

Parameters: style_index - [in] value for new current dim style. 0 <= style_index < DimStyleCount(). bQuiet - [in] if true, then no warning message box pops up if the current style request can't be satisfied. Returns: true if current dim style index successfully set.

◆ SetRemapIndex()

void CRhinoDimStyleTable::SetRemapIndex ( int  style_index,
int  remap_index 
)

◆ SetUnusedDimStyleName()

void CRhinoDimStyleTable::SetUnusedDimStyleName ( ON_DimStyle dim_style) const

Description: Sets the name on dim_style to a name that is not currently used in the this dimstyle table. Parameters: dim_style - [in/out] If dim_style has no name or an empty name, then a unique name is assigned.

If dim_style has a non-empty name, it is tested to see if is there is an existing dimension style in the table that has the same name. If the name is not used by an existing dimension style, then dim_style is not changed. If the name is used by an existing dimension style, then a suffix is appended to the dim_style name to make it unique.

◆ Sort()

void CRhinoDimStyleTable::Sort ( int(*)(const CRhinoDimStyle *, const CRhinoDimStyle *, void *)  compar,
int(*)(const CRhinoDimStyle *, void *)  cull,
void *  p 
)

Description: Use this to set CRhinoDimStyle::m_sort_index so that the values of m_sort_index run from 0 to DimStyleCount()-1 and compare(dimstyle_table[i],dimstyle_table[j]) < 0 ) implies dimstyle_table[i].m_sort_index < dimstyle_table[j].m_sort_index.

Parameters: compare - [in] compare function with prototype int compare(const CRhinoDimStyle* arg1,const CRhinoDimStyle* arg2,void* p). that returns <0 if arg1<arg2, 0 if arg1=arg2, and >0 if arg1>arg2. cull - [in] optional filter function with prototype bool cull(const CRhinoDimStyle* arg,void* p). that returns true if the dim style should be ignored when sorting. Dim styles that are ignored are not included in the list returned by GetSortedList(). Pass 0 if you do not need to cull layers p - [in] pointer passed as last argument to compare() and cull().

Remarks: After calling Sort(), you can repeatedly call GetSortedList() to get a sorted list of CRhinoDimStyle pointers. Sort() and GetSortedList() do not modify the order or persistent information in the layer table. They are intended to be used to get sorted lists of dim styles for dialogs, etc.

◆ TableReference()

const class CRhinoDocTableReference& CRhinoDimStyleTable::TableReference ( ) const

◆ UndeleteDimStyle()

bool CRhinoDimStyleTable::UndeleteDimStyle ( int  layer_index)

Description: Undeletes a dim style that has been deleted by DeleteDimStyle().

Parameters: style_index - [in] zero based index of tyle to undelete. This must be in the range 0 <= style_index < DimStyleCount().

Returns: true if successful.

◆ UndoModifyDimStyle()

bool CRhinoDimStyleTable::UndoModifyDimStyle ( int  dimstyle_index,
unsigned int  ur_sn = 0 
)

Description: If the dimsytle has been modified and the modification can be undone, then UndoModifyDimStyle() will restore the dimstyle to its previous state.

Returns: True if this dimstyle had been modified and the modifications were undone.

See Also: CRhinoDimStyle::IsModified.

Friends And Related Function Documentation

◆ CRhinoDoc

friend class CRhinoDoc
friend

◆ CRhinoRead3dmHelper

friend class CRhinoRead3dmHelper
friend

Member Data Documentation

◆ DefaultDimensionStyle

const CRhinoDimStyle& CRhinoDimStyleTable::DefaultDimensionStyle

Rhino 6 default dimension styles.

index = -1;

◆ DefaultFeetDecimal

const CRhinoDimStyle& CRhinoDimStyleTable::DefaultFeetDecimal

Rhino 7 new default dimension styles.

index = -8;

◆ DefaultFeetEngrave

const CRhinoDimStyle& CRhinoDimStyleTable::DefaultFeetEngrave

index = -10;

◆ DefaultFootInchArchitecture

const CRhinoDimStyle& CRhinoDimStyleTable::DefaultFootInchArchitecture

index = -4;

◆ DefaultInchDecimal

const CRhinoDimStyle& CRhinoDimStyleTable::DefaultInchDecimal

index = -2;

◆ DefaultInchFractional

const CRhinoDimStyle& CRhinoDimStyleTable::DefaultInchFractional

index = -3;

◆ DefaultMillimeterArchitecture

const CRhinoDimStyle& CRhinoDimStyleTable::DefaultMillimeterArchitecture

index = -7;

◆ DefaultMillimeterEngrave

const CRhinoDimStyle& CRhinoDimStyleTable::DefaultMillimeterEngrave

index = -11;

◆ DefaultMillimeterLarge

const CRhinoDimStyle& CRhinoDimStyleTable::DefaultMillimeterLarge

index = -6;

◆ DefaultMillimeterSmall

const CRhinoDimStyle& CRhinoDimStyleTable::DefaultMillimeterSmall

index = -5;

◆ DefaultModelUnitsDecimal

const CRhinoDimStyle& CRhinoDimStyleTable::DefaultModelUnitsDecimal

index = -9;

◆ DefaultModelUnitsEngrave

const CRhinoDimStyle& CRhinoDimStyleTable::DefaultModelUnitsEngrave

index = -12;