Share

GeometricConstraints Object


Description

The GeometricConstraints object provides access to all the geometric sketch constraints ( objects) in a sketch and provides methods to create additional geometric sketch constraints.

Methods

Name Description
AddCoincident Method that creates a new coincident constraint between two entities. One of the input entities must be a sketch point. The other entity can be a point or any other type of sketch entity.
AddCollinear Method that creates a new collinear constraint between the two input sketch entities. Valid objects for input include lines, ellipses, and elliptical arcs. Either the major or minor axis of an ellipse is used, depending on the value of the EllipseMajorAxis input argument. When an ellipse is used, the specified axis of the ellipse will become collinear to the other entity. This method will fail if the constraint overconstrains the sketch.
AddConcentric Method that creates a new concentric constraint between the two input sketch entities. The two entities must be circles, arcs, ellipses, or elliptical arcs. This method will fail if the constraint overconstrains the sketch.
AddEqualLength Method that creates a new equal length constraint between the two input sketch lines. This method will fail if the constraint overconstrains the sketch.
AddEqualRadius Method that creates a new equal radius constraint between the two input sketch entities. Valid input entities are circles and arcs. This method will fail if the constraint overconstrains the sketch.
AddGround Method that creates a new ground constraint on the input sketch entity. This method will fail if the constraint overconstrains the sketch.
AddHorizontal Method that creates a new horizontal constraint on the input sketch entity. Valid input objects are lines, ellipses, and elliptical arcs. Either the major or minor axis of an ellipse is used depending on the value of the EllipseMajorAxis input argument. When an ellipse is used, the specified axis of the ellipse will become horizontal. This method will fail if the constraint overconstrains the sketch.
AddHorizontalAlign Method that creates a new horizontal alignment constraint between two sketch points. This causes the two points to align along the same horizontal axis. This method will fail if the constraint overconstrains the sketch.
AddMidpoint Method that creates a new midpoint constraint between the point and line. This causes the input sketch point to be positioned at the midpoint of the input line. This method will fail if the constraint overconstrains the sketch.
AddMidPointToArc Creates a new midpoint constraint between the point and arc.
AddParallel Method that creates a new parallel constraint between the two input sketch entities. Valid objects for input include lines and ellipses. Either the major or minor axis of an ellipse is used depending on the values of UseEllipseMajorAxis input arguments. When an ellipse is used, the specified axis of the ellipse will become parallel to the other entity. This method will fail if the constraint overconstrains the sketch.
AddPerpendicular Method that creates a new perpendicular constraint between the two input sketch entities. Valid objects for input include lines and ellipses. Either the major or minor axis of an ellipse is used depending on the value of EllipseMajorAxis input argument. When an ellipse is used, the specified axis of the ellipse will become perpendicular to the other entity. This method will fail if the constraint overconstrains the sketch.
AddSmooth Method that creates a new smooth (G2-continuous) constraint. This method will fail if the constraint overconstrains the sketch.
AddSymmetry Method that creates a new symmetry constraint between the two input entities about the specified line. The two input entities must be of the same type. This method will fail if the constraint overconstrains the sketch.
AddTangent Method that creates a new tangent constraint. This method will fail if the constraint overconstrains the sketch.
AddVertical Method that creates a new vertical constraint on the input sketch entity. Valid input objects are lines and ellipses. Either the major or minor axis of an ellipse is used depending on the value of the UseEllipseMajorAxis input argument. When an ellipse is used, the specified axis of the ellipse will become vertical. This method will fail if the constraint overconstrains the sketch.
AddVerticalAlign Method that creates a new vertical alignment constraint between two sketch points. This causes the two points to align along the same vertical axis. This method will fail if the constraint overconstrains the sketch.

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.
Count Property that returns the number of items in the collection.
Item Returns the specified geometric sketch constraint object from the collection.
Type Returns an ObjectTypeEnum indicating this object's type.

Accessed From

DrawingSketch.GeometricConstraints, PlanarSketch.GeometricConstraints, PlanarSketchProxy.GeometricConstraints, Sketch.GeometricConstraints, SketchBlockDefinition.GeometricConstraints, SketchBlockDefinitionProxy.GeometricConstraints

Samples

Name Description
Create SketchedSymbol Definition This sample illustrates creating a new sketched symbol definition object and inserting it into the active sheet.
Sketch Spline This sample demonstrates creating and manipulating a sketch spline.

Version

Introduced in version 5

Was this information helpful?