SketchLinearDimension Object

Derived from: SketchDimension Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Sketch/SketchLinearDimension.h>

Description

A linear dimension in a sketch.

Methods

Name Description
classType

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

createForAssemblyContext

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

deleteMe

Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

Properties

Name Description
assemblyContext Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes Returns the collection of attributes associated with this sketch dimension.
entityOne The first entity being constrained.
entityToken
entityTwo The second entity being constrained.
isDeletable Indicates if this dimension is deletable.
isDriving Gets and sets if the dimension is Driving or is Driven. Setting this property to true for a given dimension may fail if the result would overconstrain the sketch. Fusion 360 does not allow overconstrained sketches.
isValid Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
nativeObject The NativeObject is the object outside the context of an assembly and in the context of its parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType Returns a string indicating the type of the object.
orientation The orientation of this dimension.
parameter Returns the associated parameter or null if there is no associated parameter.
parentSketch Returns the parent sketch object.
textPosition Gets and sets position of the dimension text.
value Gets and sets the current value of the sketch dimension.

In a design where the design history is being captured (parametric) and the isDriving property is True, this is exactly equivalent to getting the parameter associated with the dimension and editing its value. Editing this property will result in the parameter value being changed. If isDriving is False, this acts as a read-only property and attempting to set it will fail.

In a design where the design history is NOT being captured (direct edit) the parameter property will return null and this property can be used to get and set the value of the dimension because in this case, there isn't an associated parameter.

The value is always in internal units which means that for dimensions that represent a distance, the value is in Centimeters and for dimensions representing an angle the value is in Radians.

Accessed From

SketchDimensions.addDistanceDimension, SketchLinearDimension.createForAssemblyContext, SketchLinearDimension.nativeObject

Version

Introduced in version August 2014