Provides access to instance (block) definitions in the 3dm file.

Properties

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>

Methods

Add

#Since v6.5
public int Add(string name, string description, Point3d basePoint, GeometryBase geometry, ObjectAttributes attributes)
Adds an instance definition to the instance definition table.
name (string)The definition name.
description (string)The definition description.
basePoint (Point3d)A base point.
geometry (GeometryBase)An element.
attributes (ObjectAttributes)An attribute.
>=0 index of instance definition in the instance definition table. -1 on failure.

Add

#Since v6.5
public int Add(string name, string description, Point3d basePoint, IEnumerable<GeometryBase> geometry, IEnumerable<ObjectAttributes> attributes)
Adds an instance definition to the instance definition table.
name (string)The definition name.
description (string)The definition description.
basePoint (Point3d)A base point.
geometry (IEnumerable<GeometryBase>)An array, a list or any enumerable set of geometry.
attributes (IEnumerable<ObjectAttributes>)An array, a list or any enumerable set of attributes.
>=0 index of instance definition in the instance definition table. -1 on failure.

Add

#Since v6.5
public int Add(string name, string description, Point3d basePoint, IEnumerable<GeometryBase> geometry)
Adds an instance definition to the instance definition table.
name (string)The definition name.
description (string)The definition description.
basePoint (Point3d)A base point.
geometry (IEnumerable<GeometryBase>)An array, a list or any enumerable set of geometry.
>=0 index of instance definition in the instance definition table. -1 on failure.

Add

#Since v7.0
public int Add(string name, string description, string url, string urlTag, Point3d basePoint, IEnumerable<GeometryBase> geometry, IEnumerable<ObjectAttributes> attributes)
Adds an instance definition to the instance definition table.
name (string)The definition name.
description (string)The definition description.
url (string)A URL or hyperlink.
urlTag (string)A description of the URL or hyperlink.
basePoint (Point3d)A base point.
geometry (IEnumerable<GeometryBase>)An array, a list or any enumerable set of geometry.
attributes (IEnumerable<ObjectAttributes>)An array, a list or any enumerable set of attributes.
>=0 index of instance definition in the instance definition table. -1 on failure.

Add

public virtual void Add(T item)
Adds an item.
inherited fromFile3dmCommonComponentTable<T>
item (T)The item to add.

AddLinked

#Since v6.13
public int AddLinked(string filename, string name, string description)
Adds a linked instance definition to the instance definition table.
filename (string)Full path of the file to link.
name (string)The definition name.
description (string)The definition description.

Clear

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

Delete

public override bool Delete(T item)
Flags a component as deleted.
inherited fromFile3dmCommonComponentTable<T>
item (T)The item to flag.
True on success.

Delete

public virtual void Delete(int index)
Flags a component as deleted.
inherited fromFile3dmCommonComponentTable<T>
index (int)The index of the item to flag.
True on success.

Dump

public string Dump()
Prepares a text dump of object table.
inherited fromFile3dmCommonComponentTable<T>
A string containing the dump.

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

FindName

#Since v6.0
public InstanceDefinitionGeometry FindName(string name)
Finds an InstanceDefinitionGeometry given its name.
name (string)The name of the InstanceDefinitionGeometry to be searched.
An InstanceDefinitionGeometry, or null on error.

FindNameHash

#Since v6.0
public InstanceDefinitionGeometry FindNameHash(NameHash nameHash)
Finds a InstanceDefinitionGeometry given its name hash.
nameHash (NameHash)The name hash of the InstanceDefinitionGeometry to be searched.
An InstanceDefinitionGeometry, or null on error.

GetEnumerator

public virtual IEnumerator<T> GetEnumerator()
Returns the enumerator that yields all items.
inherited fromCommonComponentTable<T>