Properties

BuiltInStyles

#Since v6.0
public DimensionStyle[] BuiltInStyles { get; }
Creates an array of default DimensionStyle objects

ComponentType

#Since v6.0
public override ModelComponentType ComponentType { get; }

Count

public virtual int Count { get; }
Returns the count of all items, including deleted ones.
inherited fromCommonComponentTable<T>

Current

#Since v6.0
public DimensionStyle Current { get; }
Returns an instance of the current DimensionStyle.

CurrentDimensionStyle

#Since v5.0
public DimensionStyle CurrentDimensionStyle { get; }
obsoleteUse the Current property.
Do not use. Use the Current property.

CurrentId

#Since v6.0
public Guid CurrentId { get; }

CurrentIndex

#ExampleSince v6.0
public int CurrentIndex { get; }

Document

public RhinoDoc Document { get; }
Document that owns this table.
inherited fromRhinoDocCommonTable<T>

Indexers

this[]

#
public DimensionStyle this[int index] { get; }
index (int)

Methods

Add

#Since v6.0
public int Add(DimensionStyle dimstyle, bool reference)
Adds a new DimensionStyle to the document.
dimstyle (DimensionStyle)The dimension style to add
reference (bool)if true the dimstyle will not be saved in files.
index of new AnnotationStyle.

Add

#Since v5.0
public int Add(string name, bool reference)
Adds a new AnnotationStyle to the document. The new AnnotationStyle will be initialized with the current default AnnotationStyle properties.
name (string)Name of the new AnnotationStyle. If null or empty, Rhino automatically generates the name.
reference (bool)if true the dimstyle will not be saved in files.
index of new AnnotationStyle.

Add

#Since v5.0
public int Add(string name)
Adds a new AnnotationStyle to the document. The new AnnotationStyle will be initialized with the current default AnnotationStyle properties.
name (string)Name of the new AnnotationStyle. If null or empty, Rhino automatically generates the name.
index of new AnnotationStyle.

Clear

public void Clear()
Marks all items as deleted.
inherited fromCommonComponentTable<T>

Delete

#Since v6.0
public override bool Delete(DimensionStyle item)
Removes an annotation style.
item (DimensionStyle)The item to remove.
True if the item was removed; false otherwise.

Delete

#Since v6.0
public bool Delete(int index, bool quiet)
index (int)
quiet (bool)

Find

#Since v6.0
public DimensionStyle Find(Guid styleId, bool ignoreDeleted)
styleId (Guid)
ignoreDeleted (bool)

Find

#Since v5.0 Obsolete v6.0
public DimensionStyle Find(string name, bool ignoreDeleted)
obsoleteignoreDeleted is always considered true now. Use FindName.
name (string)
ignoreDeleted (bool)

FindId

public virtual T FindId(Guid id)
Uses the guid to find a model component. Deleted objects cannot be found by id. The guid is the value that is stored in the .Id property. In a single document, no two active objects have the same guid. If an object is replaced with a new object, then the guid persists. For example, if the _Move command moves an object, then the moved object inherits its guid from the starting object. If the Copy command copies an object, then the copy gets a new guid. This guid persists through file saving/opening operations. This function will not find grip objects.
inherited fromCommonComponentTable<T>
id (Guid)ID of model component to search for.
Reference to the rhino object with the objectId or null if no such object could be found.
FindId

FindIndex

#Since v6.0
public DimensionStyle FindIndex(int index)
Retrieves a DimensionStyle object based on Index. This search type of search is discouraged. We are moving towards using only IDs for all tables.
index (int)The index to search for.
A DimensionStyle object, or null if none was found.

FindName

#Since v6.0
public DimensionStyle FindName(string name)
Finds the DimensionStyle with a given name and returns it. None is returned if no DimensionStyle is found.
name (string)The string to search. Deleted styles are ignored.
The instance, or null.

FindRoot

#Since v6.0
public DimensionStyle FindRoot(Guid styleId, bool ignoreDeleted)
styleId (Guid)
ignoreDeleted (bool)

GetEnumerator

#Since v5.0
public override IEnumerator<DimensionStyle> GetEnumerator()

GetUnusedStyleName

#Since v6.0
public string GetUnusedStyleName()
Get a unique name for a style that does not already exist in the DimStyle table

GetUnusedStyleName

#Since v6.0
public string GetUnusedStyleName(string rootName)
Get a unique name for a dimension style that does not already exist in the DimStyle table
rootName (string)prefix in name; typically the parent style name

Modify

#Since v6.0
public bool Modify(DimensionStyle newSettings, Guid dimstyleId, bool quiet)
Modifies dimension style settings.
newSettings (DimensionStyle)This information is copied.
dimstyleId (Guid)Id of dimension style
quiet (bool)if true, information message boxes pop up when illegal changes are attempted.
true if successful. false if Id is not already in table

Modify

#Since v6.0
public bool Modify(DimensionStyle newSettings, int dimstyleIndex, bool quiet)
Modifies dimension style settings.
newSettings (DimensionStyle)This information is copied.
dimstyleIndex (int)zero based index of dimension to set. Must be in the range 0 <= dimstyleIndex < DimStyleTable.Count.
quiet (bool)if true, information message boxes pop up when illegal changes are attempted.
true if successful. false if dimstyleIndex is out of range

Modify

#Since v6.0
public ModifyType Modify(DimensionStyle dimstyle, AnnotationBase annotation)
dimstyle (DimensionStyle)
annotation (AnnotationBase)

PurgeUnused

#Since v9.0
public int PurgeUnused()
Purges any unused dimension styles.
The number of unused dimension styles that were purged.

SetCurrent

#Since v6.0
public bool SetCurrent(int index, bool quiet)
Sets the Current property.
index (int)The index of the current DimStyle.
quiet (bool)true if error dialog boxes are disabled. False if they are enabled.
true if the method achieved its goal; otherwise false.

SetCurrentDimensionStyleIndex

#Since v5.0 Obsolete v6.0
public bool SetCurrentDimensionStyleIndex(int index, bool quiet)
obsoleteUse the SetCurrent property.
Do not use. Use the SetCurrent(int, bool) method.
index (int)Do not use.
quiet (bool)Do not use.
Do not use.