Class Dimension
The dimension object represents a dimensioning in a model and is a GeoObject.
To use a dimension object you must at least set the properties DimensionStyle, DimLineRef,
DimLineDirection, and add two points with the AddPoint(GeoPoint) method. Example:
// assuming "project" is a reference to a Project
Dimension d = Dimension.Construct();
d.DimensionStyle = project.DimensionStyleList.Current;
d.DimLineRef = new GeoPoint(200, 200, 0);
d.DimLineDirection = GeoVector.XAxis;
d.AddPoint(new GeoPoint(100, 100, 0));
d.AddPoint(new GeoPoint(200, 100, 0));
d.AddPoint(new GeoPoint(300, 100, 0));
project.GetActiveModel().Add(d);
Inheritance
System.Object
Dimension
Implements
System.IComparable
System.ICloneable
System.Runtime.Serialization.ISerializable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: CADability.dll
Syntax
[Serializable]
public class Dimension : IGeoObjectImpl, IGeoObject, ILayer, IStyle, IOctTreeInsertable, IComparable, IFeedBack, ICloneable, ISerializable, IDimensionStyle, IGeoObjectOwner
Constructors
|
Improve this Doc
View Source
Dimension()
Declaration
|
Improve this Doc
View Source
Dimension(SerializationInfo, StreamingContext)
Constructor required by deserialization
Declaration
protected Dimension(SerializationInfo info, StreamingContext context)
Parameters
| Type |
Name |
Description |
| System.Runtime.Serialization.SerializationInfo |
info |
SerializationInfo
|
| System.Runtime.Serialization.StreamingContext |
context |
StreamingContext
|
Fields
|
Improve this Doc
View Source
Constructor
Declaration
public static Dimension.ConstructionDelegate Constructor
Field Value
|
Improve this Doc
View Source
OnPaintTo3D
Declaration
public static Dimension.PaintTo3DDelegate OnPaintTo3D
Field Value
Properties
|
Improve this Doc
View Source
DimensionStyle
Declaration
public DimensionStyle DimensionStyle { get; set; }
Property Value
|
Improve this Doc
View Source
DimLineDirection
Declaration
public GeoVector DimLineDirection { get; set; }
Property Value
|
Improve this Doc
View Source
DimLineRef
Declaration
public GeoPoint DimLineRef { get; set; }
Property Value
|
Improve this Doc
View Source
DimType
Declaration
public Dimension.EDimType DimType { get; set; }
Property Value
|
Improve this Doc
View Source
DistToEnd
Declaration
public Angle DistToEnd { get; set; }
Property Value
|
Improve this Doc
View Source
DistToStart
Declaration
public double DistToStart { get; set; }
Property Value
| Type |
Description |
| System.Double |
|
|
Improve this Doc
View Source
EndAngle
Declaration
public Angle EndAngle { get; set; }
Property Value
|
Improve this Doc
View Source
ExtLineAngle
Declaration
public Angle ExtLineAngle { get; set; }
Property Value
|
Improve this Doc
View Source
Normal
Declaration
public GeoVector Normal { get; set; }
Property Value
|
Improve this Doc
View Source
Plane
Declaration
public Plane Plane { get; }
Property Value
|
Improve this Doc
View Source
PointCount
Declaration
public int PointCount { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
PreferredStyle
Declaration
public override Style.EDefaultFor PreferredStyle { get; }
Property Value
Overrides
|
Improve this Doc
View Source
Radius
Declaration
public double Radius { get; set; }
Property Value
| Type |
Description |
| System.Double |
|
|
Improve this Doc
View Source
StartAngle
Declaration
public Angle StartAngle { get; set; }
Property Value
Methods
|
Improve this Doc
View Source
Add(IGeoObject)
Declaration
public void Add(IGeoObject toAdd)
Parameters
|
Improve this Doc
View Source
AddPoint(GeoPoint)
Declaration
public void AddPoint(GeoPoint p)
Parameters
|
Improve this Doc
View Source
Clone()
Declaration
public override IGeoObject Clone()
Returns
Overrides
|
Improve this Doc
View Source
Construct()
Declaration
public static Dimension Construct()
Returns
|
Improve this Doc
View Source
CopyGeometry(IGeoObject)
Declaration
public override void CopyGeometry(IGeoObject ToCopyFrom)
Parameters
Overrides
|
Improve this Doc
View Source
Decompose()
Declaration
public override GeoObjectList Decompose()
Returns
Overrides
|
Improve this Doc
View Source
GetAttributeProperties(IFrame)
Declaration
public override IShowProperty[] GetAttributeProperties(IFrame Frame)
Parameters
| Type |
Name |
Description |
| IFrame |
Frame |
|
Returns
Overrides
|
Improve this Doc
View Source
GetBoundingCube()
Declaration
public override BoundingCube GetBoundingCube()
Returns
Overrides
|
Improve this Doc
View Source
GetDimText(Int32)
Declaration
public string GetDimText(int index)
Parameters
| Type |
Name |
Description |
| System.Int32 |
index |
|
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
GetExtent(Projection, ExtentPrecision)
Declaration
public override BoundingRect GetExtent(Projection projection, ExtentPrecision extentPrecision)
Parameters
Returns
Overrides
|
Improve this Doc
View Source
GetExtent(Double)
Declaration
public override BoundingCube GetExtent(double precision)
Parameters
| Type |
Name |
Description |
| System.Double |
precision |
|
Returns
Overrides
|
Improve this Doc
View Source
GetHitPosition(Projection, GeoPoint2D, out Int32)
Declaration
public Dimension.HitPosition GetHitPosition(Projection p, GeoPoint2D projectedPoint, out int Index)
Parameters
Returns
|
Improve this Doc
View Source
GetObjectData(SerializationInfo, StreamingContext)
Implements System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)
Declaration
public void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
| Type |
Name |
Description |
| System.Runtime.Serialization.SerializationInfo |
info |
The System.Runtime.Serialization.SerializationInfo to populate with data.
|
| System.Runtime.Serialization.StreamingContext |
context |
The destination (System.Runtime.Serialization.StreamingContext) for this serialization.
|
|
Improve this Doc
View Source
GetPoint(Int32)
Declaration
public GeoPoint GetPoint(int Index)
Parameters
| Type |
Name |
Description |
| System.Int32 |
Index |
|
Returns
|
Improve this Doc
View Source
GetPostfix(Int32)
Declaration
public string GetPostfix(int index)
Parameters
| Type |
Name |
Description |
| System.Int32 |
index |
|
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
GetPostfixAlt(Int32)
Declaration
public string GetPostfixAlt(int index)
Parameters
| Type |
Name |
Description |
| System.Int32 |
index |
|
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
GetPrefix(Int32)
Declaration
public string GetPrefix(int index)
Parameters
| Type |
Name |
Description |
| System.Int32 |
index |
|
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
GetQuadTreeItem(Projection, ExtentPrecision)
Declaration
public override IQuadTreeInsertableZ GetQuadTreeItem(Projection projection, ExtentPrecision extentPrecision)
Parameters
Returns
Overrides
|
Improve this Doc
View Source
GetShowProperties(IFrame)
Declaration
public override IShowProperty GetShowProperties(IFrame Frame)
Parameters
| Type |
Name |
Description |
| IFrame |
Frame |
|
Returns
Overrides
|
Improve this Doc
View Source
GetTextPos(Int32)
Declaration
public double GetTextPos(int index)
Parameters
| Type |
Name |
Description |
| System.Int32 |
index |
|
Returns
| Type |
Description |
| System.Double |
|
|
Improve this Doc
View Source
GetTolMinusText(Int32)
Declaration
public string GetTolMinusText(int index)
Parameters
| Type |
Name |
Description |
| System.Int32 |
index |
|
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
GetTolPlusText(Int32)
Declaration
public string GetTolPlusText(int index)
Parameters
| Type |
Name |
Description |
| System.Int32 |
index |
|
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
HitTest(ref BoundingCube, Double)
Declaration
public override bool HitTest(ref BoundingCube cube, double precision)
Parameters
| Type |
Name |
Description |
| BoundingCube |
cube |
|
| System.Double |
precision |
|
Returns
| Type |
Description |
| System.Boolean |
|
Overrides
|
Improve this Doc
View Source
HitTest(Projection, BoundingRect, Boolean)
Declaration
public override bool HitTest(Projection projection, BoundingRect rect, bool onlyInside)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Overrides
|
Improve this Doc
View Source
HitTest(Projection.PickArea, Boolean)
Declaration
public override bool HitTest(Projection.PickArea area, bool onlyInside)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Overrides
|
Improve this Doc
View Source
IsAttributeUsed(Object)
Declaration
public override bool IsAttributeUsed(object Attribute)
Parameters
| Type |
Name |
Description |
| System.Object |
Attribute |
|
Returns
| Type |
Description |
| System.Boolean |
|
Overrides
|
Improve this Doc
View Source
Modify(ModOp)
Declaration
public override void Modify(ModOp m)
Parameters
| Type |
Name |
Description |
| ModOp |
m |
|
Overrides
|
Improve this Doc
View Source
PaintTo3D(IPaintTo3D)
Declaration
public override void PaintTo3D(IPaintTo3D paintTo3D)
Parameters
Overrides
|
Improve this Doc
View Source
Position(GeoPoint, GeoVector, Double)
Declaration
public override double Position(GeoPoint fromHere, GeoVector direction, double precision)
Parameters
Returns
| Type |
Description |
| System.Double |
|
Overrides
|
Improve this Doc
View Source
PrePaintTo3D(IPaintTo3D)
Declaration
public override void PrePaintTo3D(IPaintTo3D paintTo3D)
Parameters
Overrides
|
Improve this Doc
View Source
PrepareDisplayList(Double)
Declaration
public override void PrepareDisplayList(double precision)
Parameters
| Type |
Name |
Description |
| System.Double |
precision |
|
Overrides
|
Improve this Doc
View Source
Recalc()
Call this, if the DimensionStyle used by this Dimension was modified.
Declaration
|
Improve this Doc
View Source
Recalc(Projection, GeoObjectList)
Declaration
public void Recalc(Projection p, GeoObjectList list)
Parameters
|
Improve this Doc
View Source
Remove(IGeoObject)
Declaration
public void Remove(IGeoObject toRemove)
Parameters
|
Improve this Doc
View Source
RemovePoint(Int32)
Declaration
public void RemovePoint(int Index)
Parameters
| Type |
Name |
Description |
| System.Int32 |
Index |
|
|
Improve this Doc
View Source
SetDimText(Int32, String)
Declaration
public void SetDimText(int index, string text)
Parameters
| Type |
Name |
Description |
| System.Int32 |
index |
|
| System.String |
text |
|
|
Improve this Doc
View Source
SetPoint(Int32, GeoPoint)
Declaration
public void SetPoint(int Index, GeoPoint p)
Parameters
| Type |
Name |
Description |
| System.Int32 |
Index |
|
| GeoPoint |
p |
|
|
Improve this Doc
View Source
SetPostfix(Int32, String)
Declaration
public void SetPostfix(int index, string txt)
Parameters
| Type |
Name |
Description |
| System.Int32 |
index |
|
| System.String |
txt |
|
|
Improve this Doc
View Source
SetPostfixAlt(Int32, String)
Declaration
public void SetPostfixAlt(int index, string txt)
Parameters
| Type |
Name |
Description |
| System.Int32 |
index |
|
| System.String |
txt |
|
|
Improve this Doc
View Source
SetPrefix(Int32, String)
Declaration
public void SetPrefix(int index, string txt)
Parameters
| Type |
Name |
Description |
| System.Int32 |
index |
|
| System.String |
txt |
|
|
Improve this Doc
View Source
SetTextPos(Int32, Double)
Declaration
public void SetTextPos(int index, double val)
Parameters
| Type |
Name |
Description |
| System.Int32 |
index |
|
| System.Double |
val |
|
|
Improve this Doc
View Source
SetTolMinusText(Int32, String)
Declaration
public void SetTolMinusText(int index, string txt)
Parameters
| Type |
Name |
Description |
| System.Int32 |
index |
|
| System.String |
txt |
|
|
Improve this Doc
View Source
SetTolPlusText(Int32, String)
Declaration
public void SetTolPlusText(int index, string txt)
Parameters
| Type |
Name |
Description |
| System.Int32 |
index |
|
| System.String |
txt |
|
|
Improve this Doc
View Source
SortPoints()
Call this after a point to a dimension of type EDimType.DimCoord or EDimType.DimPoints
has been added or changed, to rorder the list of points
Declaration
Implements
System.IComparable
System.ICloneable
System.Runtime.Serialization.ISerializable