InstanceDefinitionTable
Inheritance Hierarchy
System.Object
Rhino.FileIO.CommonComponentTable. InstanceDefinition.
Rhino.DocObjects.Tables.RhinoDocCommonTable. InstanceDefinition.
Rhino.DocObjects.Tables.InstanceDefinitionTable
Namespace: Rhino.DocObjects.Tables
Assembly: RhinoCommon (in RhinoCommon.dll)
Syntax
public sealed class InstanceDefinitionTable : RhinoDocCommonTable<InstanceDefinition>
The InstanceDefinitionTable type exposes the following members.
Properties
Name
Description
Public Property
ActiveCount
Number of items in the instance definitions table, excluding deleted definitions.
Public Property
ComponentType
(Overrides
CommonComponentTable.T..ComponentType
.)Public Property
Count
Number of items in the instance definitions table.
(Overrides
CommonComponentTable.T..Count
.)Public Property
Document
Document that owns this table.
Public Property
Item
Conceptually, the InstanceDefinition table is an array of Instance definitions. The operator[] can be used to get individual instance definition. An instance definition is either active or deleted and this state is reported by IsDeleted or will be null if it has been purged from the document.
Methods
Name
Description
Public Method
Code Example
Add(String, String, Point3d, IEnumerable.GeometryBase.)
Adds an instance definition to the instance definition table.
Public Method
Add(String, String, Point3d, GeometryBase, ObjectAttributes)
Adds an instance definition to the instance definition table.
Public Method
Code Example
Add(String, String, Point3d, IEnumerable.GeometryBase., IEnumerable.ObjectAttributes.)
Adds an instance definition to the instance definition table.
Public Method
Add(String, String, String, String, Point3d, IEnumerable.GeometryBase., IEnumerable.ObjectAttributes.)
Adds an instance definition to the instance definition table.
Public Method
Clear
Marks all items as deleted.
(Inherited from CommonComponentTable.T..)
Public Method
Compact
Purge deleted instance definition information that is not in use. This function is time consuming and should be used in a thoughtful manner.
Public Method
Delete(InstanceDefinition)
Deletes the instance definition. This deletes all references too.
(Overrides
CommonComponentTable.T..Delete(T)
.)Public Method
Delete(Int32, Boolean, Boolean)
Deletes the instance definition.
Public Method
DestroySourceArchive
Destroys all source archive information. Specifically: *
SourceArchive
is set to the empty string. * SourceRelativePath is set to false * The alternative source archive path is set to the empty string. * Checksum.Zero() is used to private destroy all checksum information. *UpdateType
is set to Static.Public Method
Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public Method
Code Example
Find(String)
Finds the instance definition with a given name.
Public Method
Find(Guid, Boolean)
Finds the instance definition with a given id.
Public Method
Code Example
Find(String, Boolean)
Obsolete.
Finds the instance definition with a given name.
Public Method
FindId
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 from CommonComponentTable.T..)
Public Method
GetEnumerator
(Overrides
CommonComponentTable.T..GetEnumerator.
.)Public Method
GetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public Method
GetList
Gets an array of instance definitions.
Public Method
GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public Method
GetUnusedInstanceDefinitionName.
Gets unused instance definition name used as default when creating new instance definitions.
Public Method
GetUnusedInstanceDefinitionName(String)
Gets unused instance definition name used as default when creating new instance definitions.
Public Method
GetUnusedInstanceDefinitionName(String, UInt32)
Obsolete.
Gets unused instance definition name used as default when creating new instance definitions.
Public Method
InstanceDefinitionIndex
Get the index of the instance definition with a given id.
Public Method
MakeSourcePathRelative
Obsolete.
Obsolete method that always returns false. Marks the source path for a linked instance definition as relative or absolute.
Public Method
Modify(Int32, UserData, Boolean)
Modifies the instance definition user data. Does not change instance definition ID or geometry.
Public Method
Modify(InstanceDefinition, String, String, Boolean)
Modifies the instance definition name and description. Does not change instance definition ID or geometry.
Public Method
Code Example
Modify(Int32, String, String, Boolean)
Modifies the instance definition name and description. Does not change instance definition ID or geometry.
Public Method
Modify(InstanceDefinition, String, String, String, String, Boolean)
Modifies the instance definition name, description, and url. Does not change instance definition ID or geometry.
Public Method
Modify(Int32, String, String, String, String, Boolean)
Modifies the instance definition name, description, and url. Does not change instance definition ID or geometry.
Public Method
ModifyGeometry(Int32, IEnumerable.GeometryBase.)
Public Method
ModifyGeometry(Int32, GeometryBase, ObjectAttributes)
Public Method
ModifyGeometry(Int32, IEnumerable.GeometryBase., IEnumerable.ObjectAttributes.)
Modifies the instance definition geometry and replaces all references to the current definition with references to the new definition.
Public Method
ModifySourceArchive
If the instance definition is linked or embedded, use SetSource to specify the source archive.
Public Method
Purge
Purges an instance definition and its definition geometry.
Public Method
RefreshLinkedBlock
Reload linked block definitions and update the Rhino display.
Public Method
ToString
Returns a string that represents the current object.
(Inherited from Object.)
Public Method
Undelete
Undeletes an instance definition that has been deleted by Delete()
Public Method
UndoModify
Restores the instance definition to its previous state, if the instance definition has been modified and the modification can be undone.
Public Method
UpdateLinkedInstanceDefinition
Read the objects from a file and use them as the instance’s definition geometry.