public class File3dmInstanceDefinitionTable : File3dmCommonComponentTable<InstanceDefinitionGeometry>, IList<InstanceDefinitionGeometry>
Provides access to instance (block) definitions in the 3dm file.
Properties
Methods
public int Add(string name, string description, Point3d basePoint, GeometryBase geometry, ObjectAttributes attributes)
Adds an instance definition to the instance definition table.
Parameters:
| name (string) | The definition name. |
| description (string) | The definition description. |
| basePoint (Point3d) | A base point. |
| geometry (GeometryBase) | An element. |
| attributes (ObjectAttributes) | An attribute. |
Returns: >=0 index of instance definition in the instance definition table. -1 on failure.
public int Add(string name, string description, Point3d basePoint, IEnumerable<GeometryBase> geometry, IEnumerable<ObjectAttributes> attributes)
Adds an instance definition to the instance definition table.
Parameters:
| 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. |
Returns: >=0 index of instance definition in the instance definition table. -1 on failure.
public int Add(string name, string description, Point3d basePoint, IEnumerable<GeometryBase> geometry)
Adds an instance definition to the instance definition table.
Parameters:
| 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. |
Returns: >=0 index of instance definition in the instance definition table. -1 on failure.
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.
Parameters:
| 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. |
Returns: >=0 index of instance definition in the instance definition table. -1 on failure.
Add
public virtual void Add(T item)
Adds an item.
Parameters:
| item (T) | The item to add. |
Adds a linked instance definition to the instance definition table.
Clear
public void Clear()
Marks all items as deleted.
Parameters:
| item (T) | The item to flag. |
Returns: True on success.
Overrides: CommonComponentTable<T>.Delete
Parameters:
| index (int) | The index of the item to flag. |
Returns: True on success.
Returns: A string containing the dump.
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.
Finds an InstanceDefinitionGeometry given its name.
Parameters:
| name (string) | The name of the InstanceDefinitionGeometry to be searched. |
Returns: An InstanceDefinitionGeometry, or null on error.
Finds a InstanceDefinitionGeometry given its name hash.
Parameters:
| nameHash (NameHash) | The name hash of the InstanceDefinitionGeometry to be searched. |
Returns: An InstanceDefinitionGeometry, or null on error.
GetEnumerator
Returns the enumerator that yields all items.