SketchLine Object

Derived from: SketchEntity Object

Description

The SketchLine object represents a line within a sketch. See the article in the overviews section.

Methods

Name Description
Delete Method that deletes the sketch entity. This method will fail in the case where this object was created as a result of a derived part. The HasReferenceComponent property can be used to determine when this is the case.
GetCustomLineType Method that returns information regarding the custom line type in use. The method returns a failure if the return value of the LineType property is not kCustomLineType.
GetReferenceKey Method that generates and returns the reference key for this entity.
SetCustomLineType Method that sets a custom line type to the curve from the specified .lin file. The method automatically changes the value of LineType property to kCustomLineType.

Properties

Name Description
Application Returns the top-level parent application object. When used the context of Inventor, an Application object is returned. When used in the context of Apprentice, an ApprenticeServer object is returned.
AttributeSets Property that returns the AttributeSets collection object associated with this object.
Centerline
Constraints Property that returns a collection of sketch constraints that are tied directly to this entity. This collection consists of both geometric and dimension constraints.
ConstraintStatus Read-only property that returns the constraint status of the sketch. Possible return values are kFullyConstrainedConstraintStatus, kOverConstrainedConstraintStatus, kUnderConstrainedConstraintStatus, and kUnknownConstraintStatus.
Construction
ContainingSketchBlock Property that returns the sketch block that contains this object. This is the same SketchBlock returned as the last item in the SketchBlockPath property. This property returns Nothing if this object does not belong to a sketch block and lives directly under a sketch.
DisabledActionTypes
EndSketchPoint Property that returns the that defines the position of the end of the line.
Geometry Property that returns a LineSegment2d geometry object. The object returned represents a snapshot view of the current state of the sketch line.
Geometry3d Read-only property that returns line segment geometry that represents this line in model space.
HasReferenceComponent Property that specifies if the object was created as the result of a derived part.
Layer
Length Double property that returns the length of the entity in centimeters.
LineDefinitionSpace
LineScale
LineType
LineWeight
OverrideColor
OwnedBy Indicates entity or entities that own this object.
Parent Property that returns the parent sketch of the entity.
RangeBox Property that returns a Box2D object which contains the lower-left and upper-right corners of a rectangle that is guaranteed to enclose this object.
Reference
ReferenceComponent Property that returns the ReferenceComponent that resulted in the creation of this feature.
ReferencedEntity Property that returns the object this entity is dependent on. When sketch entities are created by projecting model edges or intersecting the model, the resulting entities are driven by the original model entities and cannot be modified.
SketchBlockPath Property that returns the path of sketch blocks at the leaf of which this sketch object is found. The enumerator returns a count of 0 if the object lives directly under a sketch.
SketchOnly
StartSketchPoint Property that returns the that defines the position of the start of the line.
Type Returns an ObjectTypeEnum indicating this object's type.

Accessed From

BendPartFeature.BendLine, BendPartFeatureProxy.BendLine, EqualLengthConstraint.LineOne, EqualLengthConstraint.LineTwo, EqualLengthConstraintProxy.LineOne, EqualLengthConstraintProxy.LineTwo, FoldDefinition.BendLine, MidpointConstraint.Line, MidpointConstraintProxy.Line, OffsetDimConstraint.Line, OffsetDimConstraintProxy.Line, SketchControlPointSpline.ControlPolygonSide, SketchControlPointSplineProxy.ControlPolygonSide, SketchLineProxy.NativeObject, SketchLines.AddByTwoPoints, SketchLines.Item, SymmetryConstraint.SymmetryLine, SymmetryConstraintProxy.SymmetryLine, TwoLineAngleDimConstraint.LineOne, TwoLineAngleDimConstraint.LineTwo, TwoLineAngleDimConstraintProxy.LineOne, TwoLineAngleDimConstraintProxy.LineTwo

Derived Classes

SketchLineProxy, SketchSplineHandle

Samples

Name Description
Using Inventor's error dialog Demonstrates using Inventor's error dialog.
Defer sketch updates This sample demonstrates the sketch defer update functionality.
Sketch Lines This sample demonstrates creating lines. It uses all of the various methods to create lines, both singly and as rectangles.
Create SketchedSymbol Definition This sample illustrates creating a new sketched symbol definition object and inserting it into the active sheet.
Sketch Display Entities This sample demonstrates the query functionality available for sketch entities.
Sweep Feature Add This sample demonstrates the creation of a sweep feature. The profile is a circle, but the path is made up of a 3D sketch and a 2D sketch.
Sketch Text Add This sample illustrates creating text in a sketch.

Version

Introduced in version 5