The ConstrainedSketchConstraint object stores the constraints associated with a sketch.
import sketch mdb.models[name].sketches[name].constraints[i]
This method creates a coincident constraint. This constraint applies to two vertices, to a vertex and a ConstrainedSketchGeometry object, or to two ConstrainedSketchGeometry objects of the same type and constrains them to be coincident.
mdb.models[name].sketches[name].CoincidentConstraint
Required arguments
A ConstrainedSketchGeometry object or a Vertex object specifying the first object.
A ConstrainedSketchGeometry object or a Vertex object specifying the second object.
Optional arguments
Return value
A ConstrainedSketchConstraint object.
Exceptions
This method creates a concentric constraint. This constraint applies to any combination of circles, arcs, ellipses, and points and constrains them to be concentric. A concentric constraint implies that the center of ConstrainedSketchGeometry objects coincide.
mdb.models[name].sketches[name].ConcentricConstraint
Required arguments
A ConstrainedSketchGeometry object specifying the first arc, circle, ellipse, or sketch vertex.
A ConstrainedSketchGeometry object specifying the second arc, circle, ellipse, or sketch vertex.
Optional arguments
Return value
A ConstrainedSketchConstraint object.
Exceptions
This method creates an equal length constraint. This constraint applies to lines and constrains them such that their lengths are equal.
mdb.models[name].sketches[name].EqualLengthConstraint
Required arguments
A ConstrainedSketchGeometry object specifying the first line.
A ConstrainedSketchGeometry object specifying the second line.
Optional arguments
Return value
A ConstrainedSketchConstraint object.
Exceptions
This method creates an equal radius constraint. This constraint applies to circles and arcs and constrains them such that their radii are equal.
mdb.models[name].sketches[name].EqualRadiusConstraint
Required arguments
A ConstrainedSketchGeometry object specifying the first arc or circle.
A ConstrainedSketchGeometry specifying the second arc or circle.
Optional arguments
Return value
A ConstrainedSketchConstraint object.
Exceptions
This method creates a fixed constraint. This constraint applies to a ConstrainedSketchGeometry object or a Vertex object and constrains them to be fixed in space. Both the location and the shape of the sketch geometry is fixed.
mdb.models[name].sketches[name].FixedConstraint
Required argument
A ConstrainedSketchGeometry object or a Vertex object specifying the item to fix in space.
Optional arguments
Return value
A ConstrainedSketchConstraint object.
Exceptions
This method creates a horizontal constraint. This constraint applies to a line and constrains it to be horizontal.
mdb.models[name].sketches[name].HorizontalConstraint
Required argument
A ConstrainedSketchGeometry object specifying the line to constrain.
Optional arguments
Return value
A ConstrainedSketchConstraint object.
Exceptions
This method creates a vertical constraint. This constraint applies to a line and constrains it to be vertical.
mdb.models[name].sketches[name].VerticalConstraint
Required argument
A ConstrainedSketchGeometry object specifying the line to constrain.
Optional arguments
Return value
A ConstrainedSketchConstraint object.
Exceptions
This method creates a parallel constraint. This constraint applies to lines and constrains them to be parallel.
mdb.models[name].sketches[name].ParallelConstraint
Required arguments
A ConstrainedSketchGeometry object specifying the first line.
A ConstrainedSketchGeometry object specifying the second line.
Optional arguments
Return value
A ConstrainedSketchConstraint object.
Exceptions
This method creates a perpendicular constraint. This constraint applies to different types of ConstrainedSketchGeometry objects and constrains them to be perpendicular to each other.
mdb.models[name].sketches[name].PerpendicularConstraint
Required arguments
A ConstrainedSketchGeometry object specifying the first object.
A ConstrainedSketchGeometry object specifying the second object.
Optional arguments
Return value
A ConstrainedSketchConstraint object.
Exceptions
This method creates an equal distance constraint. This constraint can be applied between a midpoint Vertex object and any other two Vertex objects or between a midpoint Vertex object and two ConstrainedSketchGeometry objects that are lines. The equal distance constraint forces the midpoint vertex to remain at an equal distance from the two other vertices or lines.
mdb.models[name].sketches[name].EqualDistanceConstraint
Required arguments
AConstrainedSketchGeometry object specifying the first line or Vertex object.
A ConstrainedSketchGeometry object specifying the second line or Vertex object.
A Vertex object specifying the vertex that will be positioned an equal distance from entity1 and entity2.
Optional arguments
Return value
A ConstrainedSketchConstraint object.
Exceptions
This method creates a tangent constraint. This constraint applies to different types of ConstrainedSketchGeometry objects and constrains them to remain tangential.
mdb.models[name].sketches[name].TangentConstraint
Required arguments
A ConstrainedSketchGeometry object specifying the first object.
A ConstrainedSketchGeometry object specifying the second object.
Optional arguments
Return value
A ConstrainedSketchConstraint object.
Exceptions