SketchConstraintBuilder Class

class NXOpen.SketchConstraintBuilder

Bases: NXOpen.Builder

Represents a NXOpen.SketchConstraint builder

To create a new instance of this class, use NXOpen.SketchCollection.CreateConstraintBuilder()

New in version NX8.5.0.

Properties

Property Description
Centerline Returns the centerline for a symmetric constraint type
ConstraintType Returns or sets the constraint type
GeometryToConstrain Returns the geometries to be constrained
GeometryToConstrainTo Returns the secondary geometries to be constrained
MakeReference Returns or sets the flag specifying whether or not to make the centerline reference geometry
Tag Returns the Tag for this object.
UpdateSketchAtCommit Returns or sets the flag specifying whether or not to update the sketch during the builder commit.

Methods

Method Description
Commit Commits any edits that have been applied to the builder.
Destroy Deletes the builder, and cleans up any objects created by the builder.
GetCommittedObjects For builders that create more than one object, this method returns the objects that are created by commit.
GetObject Returns the object currently being edited by this builder.
ShowResults Updates the model to reflect the result of an edit to the model for all builders that support showing results.
Validate Validate whether the inputs to the component are sufficient for commit to be called.

Enumerations

SketchConstraintBuilderConstraint Enumeration the types of the constraint

Property Detail

Centerline

SketchConstraintBuilder.Centerline

Returns the centerline for a symmetric constraint type

-------------------------------------

Getter Method

Signature Centerline

Returns:
Return type:NXOpen.SelectNXObject

New in version NX8.5.0.

License requirements: None.

ConstraintType

SketchConstraintBuilder.ConstraintType

Returns or sets the constraint type

-------------------------------------

Getter Method

Signature ConstraintType

Returns:
Return type:NXOpen.SketchConstraintBuilderConstraint

New in version NX8.5.0.

License requirements: None.

-------------------------------------

Setter Method

Signature ConstraintType

Parameters:constraintType (NXOpen.SketchConstraintBuilderConstraint) –

New in version NX8.5.0.

License requirements: None.

GeometryToConstrain

SketchConstraintBuilder.GeometryToConstrain

Returns the geometries to be constrained

-------------------------------------

Getter Method

Signature GeometryToConstrain

Returns:
Return type:NXOpen.SelectNXObjectList

New in version NX8.5.0.

License requirements: None.

GeometryToConstrainTo

SketchConstraintBuilder.GeometryToConstrainTo

Returns the secondary geometries to be constrained

-------------------------------------

Getter Method

Signature GeometryToConstrainTo

Returns:
Return type:NXOpen.SelectNXObject

New in version NX8.5.0.

License requirements: None.

MakeReference

SketchConstraintBuilder.MakeReference

Returns or sets the flag specifying whether or not to make the centerline reference geometry

-------------------------------------

Getter Method

Signature MakeReference

Returns:
Return type:bool

New in version NX8.5.0.

License requirements: None.

-------------------------------------

Setter Method

Signature MakeReference

Parameters:makeReference (bool) –

New in version NX8.5.0.

License requirements: None.

UpdateSketchAtCommit

SketchConstraintBuilder.UpdateSketchAtCommit

Returns or sets the flag specifying whether or not to update the sketch during the builder commit.

The default value is true. If the value is set to false, the sketch will not update during the builder commit.

-------------------------------------

Getter Method

Signature UpdateSketchAtCommit

Returns:
Return type:bool

New in version NX11.0.0.

License requirements: None.

-------------------------------------

Setter Method

Signature UpdateSketchAtCommit

Parameters:updateSketch (bool) –

New in version NX11.0.0.

License requirements: None.

Method Detail

Validate

SketchConstraintBuilder.Validate

Validate whether the inputs to the component are sufficient for commit to be called.

If the component is not in a state to commit then an exception is thrown. For example, if the component requires you to set some property, this method will throw an exception if you haven’t set it. This method throws a not-yet-implemented NXException for some components.

Signature Validate()

Returns:Was self validation successful
Return type:bool

New in version NX3.0.1.

License requirements: None.