Represents a simple object table for a file that is open externally.

This class mimics Rhino.DocObjects.Tables.ObjectTable while providing external access to the file.

Properties

ComponentType

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

Count

#Since v5.0
public override int Count { get; }
Returns the total amount of items in the object table, including lights.

Methods

Add

#Since v6.0
public Guid Add(GeometryBase item, ObjectAttributes attributes)
Duplicates the object, then adds a copy of the object to the document.
item (GeometryBase)The item to duplicate and add.
attributes (ObjectAttributes)The attributes to link with geometry.

Add

#Since v6.0
public override void Add(File3dmObject item)
Duplicates the object, then adds a copy of the object to the document.
item (File3dmObject)The item to duplicate and add.

AddAngularDimension

#Since v6.5
public Guid AddAngularDimension(AngularDimension dimension, ObjectAttributes attributes)
Adds a angular dimension object to the 3dm file object table.
dimension (AngularDimension)Dimension object to add.
attributes (ObjectAttributes)Attributes to apply to dimension.
A unique identifier for the object.

AddAngularDimension

#Since v6.5
public Guid AddAngularDimension(AngularDimension dimension)
Adds a angular dimension object to the 3dm file object table.
dimension (AngularDimension)Dimension object to add.
A unique identifier for the object.

AddArc

#Since v5.0
public Guid AddArc(Arc arc, ObjectAttributes attributes)
Adds a curve object to the document representing an arc.
arc (Arc)An arc to add.
attributes (ObjectAttributes)attributes to apply to arc.
A unique identifier for the object.

AddArc

#Since v5.0
public Guid AddArc(Arc arc)
Adds a curve object to the document representing an arc.
arc (Arc)An arc.
A unique identifier for the object.

AddBrep

#Since v5.0
public Guid AddBrep(Brep brep, ObjectAttributes attributes)
Adds a brep object to Rhino.
brep (Brep)A duplicate of this brep is added to Rhino.
attributes (ObjectAttributes)Attributes to apply to brep.
A unique identifier for the object.

AddBrep

#Since v5.0
public Guid AddBrep(Brep brep)
Adds a brep object to Rhino.
brep (Brep)A duplicate of this brep is added to Rhino.
A unique identifier for the object.

AddCircle

#Since v5.0
public Guid AddCircle(Circle circle, ObjectAttributes attributes)
Adds a curve object to the document representing a circle.
circle (Circle)A circle to add.
attributes (ObjectAttributes)attributes to apply to circle.
A unique identifier for the object.

AddCircle

#Since v5.0
public Guid AddCircle(Circle circle)
Adds a curve object to the document representing a circle.
circle (Circle)A circle to add.
A unique identifier for the object.

AddClippingPlane

#ExampleSince v5.0
public Guid AddClippingPlane(Plane plane, double uMagnitude, double vMagnitude, Guid clippedViewportId)
Adds a clipping plane object to Rhino.
plane (Plane)A plane.
uMagnitude (double)The size in U direction.
vMagnitude (double)The size in V direction.
clippedViewportId (Guid)The viewport id that the new clipping plane will clip.
A unique identifier for the object.

AddClippingPlane

#Since v5.0
public Guid AddClippingPlane(Plane plane, double uMagnitude, double vMagnitude, IEnumerable<Guid> clippedViewportIds, ObjectAttributes attributes)
Adds a clipping plane object to Rhino.
plane (Plane)A plane.
uMagnitude (double)The size in U direction.
vMagnitude (double)The size in V direction.
clippedViewportIds (IEnumerable<Guid>)list of viewport ids that the new clipping plane will clip.
attributes (ObjectAttributes)Attributes to apply to point cloud.
A unique identifier for the object.

AddClippingPlane

#Since v5.0
public Guid AddClippingPlane(Plane plane, double uMagnitude, double vMagnitude, IEnumerable<Guid> clippedViewportIds)
Adds a clipping plane object to Rhino.
plane (Plane)A plane.
uMagnitude (double)The size in U direction.
vMagnitude (double)The size in V direction.
clippedViewportIds (IEnumerable<Guid>)A list, an array or any enumerable of viewport ids that the new clipping plane will clip.
A unique identifier for the object.

AddCurve

#Since v5.0
public Guid AddCurve(Curve curve, ObjectAttributes attributes)
Adds a curve object to the table.
curve (Curve)A duplicate of this curve is added to Rhino.
attributes (ObjectAttributes)Attributes to apply to curve.
A unique identifier for the object.

AddCurve

#Since v5.0
public Guid AddCurve(Curve curve)
Adds a curve object to the table.
curve (Curve)A curve to add.
A unique identifier for the object.

AddEllipse

#Since v5.0
public Guid AddEllipse(Ellipse ellipse, ObjectAttributes attributes)
Adds a curve object to the document representing an ellipse.
ellipse (Ellipse)An ellipse to add.
attributes (ObjectAttributes)attributes to apply to ellipse.
A unique identifier for the object.

AddEllipse

#Since v5.0
public Guid AddEllipse(Ellipse ellipse)
Adds a curve object to the document representing an ellipse.
ellipse (Ellipse)An ellipse to add.
A unique identifier for the object.

AddExtrusion

#Since v5.0
public Guid AddExtrusion(Extrusion extrusion, ObjectAttributes attributes)
Adds an extrusion object to Rhino.
extrusion (Extrusion)A duplicate of this extrusion is added to Rhino.
attributes (ObjectAttributes)Attributes to link to the object.
A unique identifier for the object.

AddExtrusion

#Since v5.0
public Guid AddExtrusion(Extrusion extrusion)
Adds an extrusion object to Rhino.
extrusion (Extrusion)A duplicate of this extrusion is added to Rhino.
A unique identifier for the object.

AddHatch

#Since v5.0
public Guid AddHatch(Hatch hatch, ObjectAttributes attributes)
Adds a hatch to the document.
hatch (Hatch)A hatch.
attributes (ObjectAttributes)Attributes to apply
A unique identifier for the hatch, or Guid.Empty on failure.

AddHatch

#Since v5.0
public Guid AddHatch(Hatch hatch)
Adds a hatch to the document.
hatch (Hatch)A hatch.
A unique identifier for the hatch, or Guid.Empty on failure.

AddInstanceObject

#Since v6.5
public Guid AddInstanceObject(InstanceReferenceGeometry instanceReference, ObjectAttributes attributes)
Adds an instance reference geometry object to the table.
instanceReference (InstanceReferenceGeometry)The instance reference geometry object.
attributes (ObjectAttributes)The attributes to link with the object.
A unique identifier for the object.

AddInstanceObject

#Since v6.5
public Guid AddInstanceObject(InstanceReferenceGeometry instanceReference)
Adds an instance reference geometry object to the table.
instanceReference (InstanceReferenceGeometry)The instance reference geometry object.
A unique identifier for the object.

AddInstanceObject

#Since v6.5
public Guid AddInstanceObject(int instanceDefinitionIndex, Transform instanceXform, ObjectAttributes attributes)
Adds an instance reference geometry object to the table.
instanceDefinitionIndex (int)The index of the instance definition geometry object.
instanceXform (Transform)The transformation.
attributes (ObjectAttributes)The object attributes.
A unique identifier for the object.

AddInstanceObject

#Since v6.5
public Guid AddInstanceObject(int instanceDefinitionIndex, Transform instanceXform)
Adds an instance reference geometry object to the table.
instanceDefinitionIndex (int)The index of the instance definition geometry object.
instanceXform (Transform)The transformation.
A unique identifier for the object.

AddLeader

#Since v5.0
public Guid AddLeader(IEnumerable<Point3d> points)
Adds an annotation leader to the document. This overload is only provided in the Rhino SDK.
points (IEnumerable<Point3d>)A list, an array or any enumerable set of 2d points.
A unique identifier for the object; or Guid.Empty on failure.

AddLeader

#Since v5.0
public Guid AddLeader(Plane plane, IEnumerable<Point2d> points, ObjectAttributes attributes)
Adds an annotation leader to the document.
plane (Plane)A plane.
points (IEnumerable<Point2d>)A list, an array or any enumerable set of 2d points.
attributes (ObjectAttributes)Attributes to apply to brep.
A unique identifier for the object; or Guid.Empty on failure.

AddLeader

#Since v5.0
public Guid AddLeader(Plane plane, IEnumerable<Point2d> points)
Adds an annotation leader to the document.
plane (Plane)A plane.
points (IEnumerable<Point2d>)A list, an array or any enumerable set of 2d points.
A unique identifier for the object; or Guid.Empty on failure.

AddLeader

#Since v5.0
public Guid AddLeader(string text, IEnumerable<Point3d> points)
Adds an annotation leader to the document. This overload is only provided in the Rhino SDK.
text (string)The text.
points (IEnumerable<Point3d>)A list, an array or any enumerable set of 2d points.
A unique identifier for the object; or Guid.Empty on failure.

AddLeader

#Since v5.0
public Guid AddLeader(string text, Plane plane, IEnumerable<Point2d> points, ObjectAttributes attributes)
Adds an annotation leader to the document.
text (string)The text.
plane (Plane)A plane.
points (IEnumerable<Point2d>)A list, an array or any enumerable set of 2d points.
attributes (ObjectAttributes)Attributes to apply to brep.
A unique identifier for the object; or Guid.Empty on failure.

AddLeader

#Since v5.0
public Guid AddLeader(string text, Plane plane, IEnumerable<Point2d> points)
Adds an annotation leader to the document.
text (string)The text.
plane (Plane)A plane.
points (IEnumerable<Point2d>)A list, an array or any enumerable set of 2d points.
A unique identifier for the object; or Guid.Empty on failure.

AddLine

#Since v5.0
public Guid AddLine(Line line, ObjectAttributes attributes)
Adds a line object to Rhino.
line (Line)A line.
attributes (ObjectAttributes)Attributes to apply to line.
A unique identifier for the object.

AddLine

#Since v5.0
public Guid AddLine(Line line)
Adds a line object to Rhino.
line (Line)
A unique identifier for the object.

AddLine

#Since v5.0
public Guid AddLine(Point3d from, Point3d to, ObjectAttributes attributes)
Adds a line object to Rhino.
from (Point3d)The start point of the line.
to (Point3d)The end point of the line.
attributes (ObjectAttributes)Attributes to apply to line.
A unique identifier for the object.

AddLine

#Since v5.0
public Guid AddLine(Point3d from, Point3d to)
Adds a line object to Rhino.
from (Point3d)A line start point.
to (Point3d)A line end point.
A unique identifier of new rhino object.

AddLinearDimension

#Since v5.0
public Guid AddLinearDimension(LinearDimension dimension, ObjectAttributes attributes)
Adds a linear dimension to the 3dm file object table.
dimension (LinearDimension)A dimension.
attributes (ObjectAttributes)Attributes to apply to dimension.
A unique identifier for the object.

AddLinearDimension

#Since v5.0
public Guid AddLinearDimension(LinearDimension dimension)
Adds a linear dimension to the 3dm file object table.
dimension (LinearDimension)A dimension.
A unique identifier for the object.

AddMesh

#Since v5.0
public Guid AddMesh(Mesh mesh, ObjectAttributes attributes)
Adds a mesh object to Rhino.
mesh (Mesh)A duplicate of this mesh is added to Rhino.
attributes (ObjectAttributes)Attributes to link to the object.
A unique identifier for the object.

AddMesh

#Since v5.0
public Guid AddMesh(Mesh mesh)
Adds a mesh object to Rhino.
mesh (Mesh)A duplicate of this mesh is added to Rhino.
A unique identifier for the object.

AddOrdinateDimension

#Since v7.32
public Guid AddOrdinateDimension(OrdinateDimension dimension, ObjectAttributes attributes)
Adds an ordinate dimension object to the 3dm file object table.
dimension (OrdinateDimension)Dimension object to add.
attributes (ObjectAttributes)Attributes to apply to dimension.
A unique identifier for the object.

AddOrdinateDimension

#Since v7.32
public Guid AddOrdinateDimension(OrdinateDimension dimension)
Adds an ordinate dimension object to the 3dm file object table.
dimension (OrdinateDimension)Dimension object to add.
A unique identifier for the object.

AddPoint

#Since v5.0
public Guid AddPoint(double x, double y, double z)
Adds a point object to the table.
x (double)X component of point coordinate.
y (double)Y component of point coordinate.
z (double)Z component of point coordinate.
id of new object.

AddPoint

#Since v5.0
public Guid AddPoint(Point3d point, ObjectAttributes attributes)
Adds a point object to the document.
point (Point3d)A location for point.
attributes (ObjectAttributes)attributes to apply to point.
A unique identifier for the object.

AddPoint

#Since v5.0
public Guid AddPoint(Point3d point)
Adds a point object to the table.
point (Point3d)A location for point.
Id of new object.

AddPoint

#Since v5.0
public Guid AddPoint(Point3f point, ObjectAttributes attributes)
Adds a point object to the document.
point (Point3f)location of point.
attributes (ObjectAttributes)attributes to apply to point.
A unique identifier for the object.

AddPoint

#Since v5.0
public Guid AddPoint(Point3f point)
Adds a point object to the document.
point (Point3f)location of point.
A unique identifier for the object.

AddPointCloud

#Since v5.0
public Guid AddPointCloud(IEnumerable<Point3d> points, ObjectAttributes attributes)
Adds a point cloud object to the document.
points (IEnumerable<Point3d>)A list, an array or any enumerable set of Point3d.
attributes (ObjectAttributes)Attributes to apply to point cloud.
A unique identifier for the object.

AddPointCloud

#Since v5.0
public Guid AddPointCloud(IEnumerable<Point3d> points)
Adds a point cloud object to the document.
points (IEnumerable<Point3d>)A list, an array or any enumerable set of Point3d.
A unique identifier for the object.

AddPointCloud

#Since v5.0
public Guid AddPointCloud(PointCloud cloud, ObjectAttributes attributes)
Adds a point cloud object to the document.
cloud (PointCloud)PointCloud to add.
attributes (ObjectAttributes)attributes to apply to point cloud.
A unique identifier for the object.

AddPointCloud

#Since v5.0
public Guid AddPointCloud(PointCloud cloud)
Adds a point cloud object to the document.
cloud (PointCloud)PointCloud to add.
A unique identifier for the object.

AddPoints

#Since v5.0
public Guid[] AddPoints(IEnumerable<Point3d> points, ObjectAttributes attributes)
Adds multiple points to the document.
points (IEnumerable<Point3d>)Points to add.
attributes (ObjectAttributes)Attributes to apply to point objects.
An array of object unique identifiers.

AddPoints

#Since v5.0
public Guid[] AddPoints(IEnumerable<Point3d> points)
Adds multiple points to the document.
points (IEnumerable<Point3d>)Points to add.
List of object ids.

AddPoints

#Since v5.0
public Guid[] AddPoints(IEnumerable<Point3f> points, ObjectAttributes attributes)
Adds multiple points to the document.
points (IEnumerable<Point3f>)Points to add.
attributes (ObjectAttributes)Attributes to apply to point objects.
An array of object unique identifiers.

AddPoints

#Since v5.0
public Guid[] AddPoints(IEnumerable<Point3f> points)
Adds multiple points to the document.
points (IEnumerable<Point3f>)Points to add.
An array of object unique identifiers.

AddPolyline

#Since v5.0
public Guid AddPolyline(IEnumerable<Point3d> points, ObjectAttributes attributes)
Adds a polyline object to Rhino.
points (IEnumerable<Point3d>)A list, an array or any enumerable set of Point3d.
attributes (ObjectAttributes)Attributes to apply to line.
A unique identifier for the object.

AddPolyline

#Since v5.0
public Guid AddPolyline(IEnumerable<Point3d> points)
Adds a polyline object to Rhino.
points (IEnumerable<Point3d>)A list, an array or any enumerable set of Point3d.
A unique identifier for the object.

AddRadialDimension

#Since v7.32
public Guid AddRadialDimension(RadialDimension dimension, ObjectAttributes attributes)
Adds a radial dimension object to the 3dm file object table.
dimension (RadialDimension)Dimension object to add.
attributes (ObjectAttributes)Attributes to apply to dimension.
A unique identifier for the object.

AddRadialDimension

#Since v7.32
public Guid AddRadialDimension(RadialDimension dimension)
Adds a radial dimension object to the 3dm file object table.
dimension (RadialDimension)Dimension object to add.
A unique identifier for the object.

AddSphere

#Since v5.0
public Guid AddSphere(Sphere sphere, ObjectAttributes attributes)
Adds a surface object to the document representing a sphere.
sphere (Sphere)A sphere to add.
attributes (ObjectAttributes)Attributes to link with the sphere.
A unique identifier for the object.

AddSphere

#Since v5.0
public Guid AddSphere(Sphere sphere)
Adds a surface object to the document representing a sphere.
sphere (Sphere)A sphere to add.
A unique identifier for the object.

AddSubD

#Since v7.1
public Guid AddSubD(SubD subd, ObjectAttributes attributes)
Adds a SubD to the document
subd (SubD)the Subd to add
attributes (ObjectAttributes)Attributes to apply
A unique identifier for the SubD, or Guid.Empty on failure

AddSubD

#Since v7.1
public Guid AddSubD(SubD subd)
Adds a SubD to the document
subd (SubD)the Subd to add
A unique identifier for the SubD, or Guid.Empty on failure

AddSurface

#Since v5.0
public Guid AddSurface(Surface surface, ObjectAttributes attributes)
Adds a surface object to Rhino.
surface (Surface)A duplicate of this surface is added to Rhino.
attributes (ObjectAttributes)Attributes to link to the object.
A unique identifier for the object.

AddSurface

#Since v5.0
public Guid AddSurface(Surface surface)
Adds a surface object to Rhino.
surface (Surface)A duplicate of this surface is added to Rhino.
A unique identifier for the object.

AddText

#Since v5.0
public Guid AddText(string text, Plane plane, double height, string fontName, bool bold, bool italic, ObjectAttributes attributes)
Adds an annotation text object to the document.
text (string)Text string.
plane (Plane)Plane of text.
height (double)Height of text.
fontName (string)Name of FontFace.
bold (bool)Bold flag.
italic (bool)Italic flag.
attributes (ObjectAttributes)Object Attributes.
The Guid of the newly added object or Guid.Empty on failure.

AddText

#Since v5.0
public Guid AddText(string text, Plane plane, double height, string fontName, bool bold, bool italic, TextJustification justification, ObjectAttributes attributes)
Adds an annotation text object to the document.
text (string)Text string.
plane (Plane)Plane of text.
height (double)Height of text.
fontName (string)Name of FontFace.
bold (bool)Bold flag.
italic (bool)Italic flag.
justification (TextJustification)The justification of the text.
attributes (ObjectAttributes)Attributes to link to the object.
The Guid of the newly added object or Guid.Empty on failure.

AddText

#Since v5.0
public Guid AddText(string text, Plane plane, double height, string fontName, bool bold, bool italic, TextJustification justification)
Adds an annotation text object to the document.
text (string)Text string.
plane (Plane)Plane of text.
height (double)Height of text.
fontName (string)Name of FontFace.
bold (bool)Bold flag.
italic (bool)Italic flag.
justification (TextJustification)The justification of the text.
The Guid of the newly added object or Guid.Empty on failure.

AddText

#Since v5.0
public Guid AddText(string text, Plane plane, double height, string fontName, bool bold, bool italic)
Adds an annotation text object to the document.
text (string)Text string.
plane (Plane)Plane of text.
height (double)Height of text.
fontName (string)Name of FontFace.
bold (bool)Bold flag.
italic (bool)Italic flag.
The Guid of the newly added object or Guid.Empty on failure.

AddText

#Since v5.0
public Guid AddText(Text3d text3d, ObjectAttributes attributes)
Adds an annotation text object to the document.
text3d (Text3d)The text object to add.
attributes (ObjectAttributes)Attributes to link to the object.
The Guid of the newly added object or Guid.Empty on failure.

AddText

#Since v5.0
public Guid AddText(Text3d text3d)
Adds an annotation text object to the document.
text3d (Text3d)The text object to add.
The Guid of the newly added object or Guid.Empty on failure.

AddTextDot

#Since v5.0
public Guid AddTextDot(string text, Point3d location, ObjectAttributes attributes)
Adds a text dot object to the table.
text (string)The text.
location (Point3d)The location.
attributes (ObjectAttributes)Attributes to link with curve.
A unique identifier for the object.

AddTextDot

#Since v5.0
public Guid AddTextDot(string text, Point3d location)
Adds a text dot object to the table.
text (string)The text.
location (Point3d)The location.
A unique identifier for the object.

AddTextDot

#Since v5.0
public Guid AddTextDot(TextDot dot, ObjectAttributes attributes)
Adds a text dot object to the table.
dot (TextDot)The text dot.
attributes (ObjectAttributes)Attributes to link with text dot.
A unique identifier for the object.

AddTextDot

#Since v5.0
public Guid AddTextDot(TextDot dot)
Adds a text dot object to the table.
dot (TextDot)The text dot.
A unique identifier for the object.

Clear

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

Delete

#Since v5.2
public bool Delete(Guid objectId)
Deletes object from document.
objectId (Guid)Id of the object to delete.
true on success, false on failure.

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

#Since v5.2
public int Delete(IEnumerable<Guid> objectIds)
Deletes a collection of objects from the document.
objectIds (IEnumerable<Guid>)Ids of all objects to delete.
The number of successfully deleted objects.

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.

FindByGroup

#Since v6.20
public File3dmObject[] FindByGroup(Group group)
Finds all File3dmObject that are in a given group.
group (Group)A group instance.
Array of objects that belong to the specified group or empty array if no objects could be found.
ArgumentNullExceptionIf group is null.

FindByLayer

#Since v6.0
public File3dmObject[] FindByLayer(Layer layer)
Finds all File3dmObject that are in a given layer.
layer (Layer)A layer instance.
Array of objects that belong to the specified layer or empty array if no objects could be found.
ArgumentNullExceptionIf layer is null.

FindByLayer

#Since v5.0
public File3dmObject[] FindByLayer(string layer)
Finds all File3dmObject that are in a given layer.
layer (string)Layer to search.
Array of objects that belong to the specified layer or empty array if no objects could be found.

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

GetBoundingBox

#Since v5.0
public BoundingBox GetBoundingBox()
Gets the bounding box containing every object in this table.
The computed bounding box.

GetEnumerator

#Since v5.0
public override IEnumerator<File3dmObject> GetEnumerator()
Returns an enumerator that yields all objects in this document. Like in Rhino, this includes lights. Unlike in Rhino, however, all lights are returned in the end of the list.
An enumerator that yields all objects in a document.