Click or drag to resize
InstanceReferenceGeometry Constructor
Constructor used when creating nested instance references.

Namespace: Rhino.Geometry
Assembly: RhinoCommon (in RhinoCommon.dll) Version: 5.1.50000.0 (5.0.20693.0)
Syntax
public InstanceReferenceGeometry(
	Guid instanceDefinitionId,
	Transform transform
)

Parameters

instanceDefinitionId
Type: SystemGuid

[Missing <param name="instanceDefinitionId"/> documentation for "M:Rhino.Geometry.InstanceReferenceGeometry.#ctor(System.Guid,Rhino.Geometry.Transform)"]

transform
Type: Rhino.GeometryTransform

[Missing <param name="transform"/> documentation for "M:Rhino.Geometry.InstanceReferenceGeometry.#ctor(System.Guid,Rhino.Geometry.Transform)"]

Examples
C#
using System;

using Rhino;
using Rhino.Geometry;

partial class Examples
{
  public static Rhino.Commands.Result AddNestedBlock(RhinoDoc doc)
  {
    var circle = new Circle(Point3d.Origin, 5);
    Curve[] curveList = { new ArcCurve(circle) };
    var circleIndex = doc.InstanceDefinitions.Add("Circle", "Circle with radius of 5", Point3d.Origin, curveList);
    var transform = Transform.Identity;
    var irefId = doc.InstanceDefinitions[circleIndex].Id;
    var iref = new InstanceReferenceGeometry(irefId, transform);
    circle.Radius = circle.Radius * 2.0;
    GeometryBase[] blockList = { iref, new ArcCurve(circle) };
    var circle2Index = doc.InstanceDefinitions.Add("TwoCircles", "Nested block test", Point3d.Origin, blockList);
    doc.Objects.AddInstanceObject(circle2Index, transform);
    doc.Views.Redraw();
    return Rhino.Commands.Result.Success;
  }
}
See Also