Adds or edits a linear dimension.
Valid intent combinations are: Two points, Two curves, Point and a curve, One linear curve, One arc curve (with DimensionType set to kAlignedDimensionType for chord length and kArcLengthDimensionType for arc length).
Namespace: Autodesk.iLogic.Interfaces
Assembly: Autodesk.iLogic.Interfaces (in Autodesk.iLogic.Interfaces.dll) Version: 29.0
Syntax
VB
Function AddLinear ( name As String, textOrigin As LinearDimensionTextPositionSpec, intentOne As GeometryIntent, Optional intentTwo As GeometryIntent = Nothing, Optional dimensionType As DimensionTypeEnum = DimensionTypeEnum.kAlignedDimensionType, Optional alignmentGeometry As Object = Nothing, Optional arrowHeadsInside As Boolean = true, Optional dimensionStyle As DimensionStyle = Nothing, Optional layer As Layer = Nothing ) As IManagedLinearGeneralDimension
C#
IManagedLinearGeneralDimension AddLinear( string name, LinearDimensionTextPositionSpec textOrigin, GeometryIntent intentOne, GeometryIntent intentTwo = null, DimensionTypeEnum dimensionType = DimensionTypeEnum.kAlignedDimensionType, Object alignmentGeometry = null, bool arrowHeadsInside = true, DimensionStyle dimensionStyle = null, Layer layer = null )
Parameters
- name
- Type: System.String
The name of the dimension. - textOrigin
- Type: Autodesk.iLogic.Types.LinearDimensionTextPositionSpec
The position of the dimension text on the sheet. - intentOne
- Type: GeometryIntent
Specifies the first geometry to dimension. This can be created using the GetIntent method on the IManagedDrawingView object. - intentTwo (Optional)
- Type: GeometryIntent
Specifies the second geometry to dimension. This argument must be specified if the first geometry intent is a point. - dimensionType (Optional)
- Type: DimensionTypeEnum
Specifies the linear dimension type. Valid values (based on the input intents) are kAlignedDimensionType, kHorizontalDimensionType, kVerticalDimensionType, kArcLengthDimensionType, kSymmetricDimensionType and kDiametricDimensionType. If not specified, the argument defaults to kAlignedDimensionType. An error will occur if the specified type is invalid for the input intents. For instance, kHorizontalDimensionType is invalid for a vertical dimension and kSymmetricDimensionType and kDiametricDimensionType are invalid if only the first intent (an edge) is specified. kArcLengthDimensionType is only valid if two intents are supplied and they represent end points of an arc or a single intent is supplied and it represents an arc. - alignmentGeometry (Optional)
- Type: System.Object
The linear geometry object to align the dimension. Valid objects are DrawingCurve and SketchLine in the same DrawingView as the dimension. This is only applicable if the DimensionType is set to kAlignedToCurveDimensionType or kNormalToCurveDimensionType. - arrowHeadsInside (Optional)
- Type: System.Boolean
Indicates whether to place the dimension line arrows inside or outside. If not specified, this argument defaults to True indicating that arrowheads will be placed inside (if possible). - dimensionStyle (Optional)
- Type: DimensionStyle
The dimension style to use for the dimension. If not specified, the style defined by the active standard is used. - layer (Optional)
- Type: Layer
The layer to use for the dimension. If not specified, the layer defined by the active standard is used.
Return Value
Type: IManagedLinearGeneralDimensionThe dimension.