SketchPreferences Class

class NXOpen.Preferences.SketchPreferences

Bases: object

Represents the set of sketch preferences applicable on NXOpen.Sketch object

To obtain an instance of this class, refer to NXOpen.Sketch

New in version NX3.0.0.

Properties

Property Description
ConstraintSymbolSize Returns or sets the constraint symbol size
ContinuousAutoDimensioningSetting Returns or sets the option to set continuous auto dimensioning in a sketch on or off.
CreateInferredConstraints Returns or sets the option to control if inferred constraints are automatically created when curves and points are created in the sketch.
DimensionLabel Returns or sets the dimension label.
DisplayObjectColor Returns or sets the toggle that controls whether objects are displayed in their actual color in sketch
DisplayObjectName Returns or sets the toggle that controls whether objects are displayed with their names in sketch
FixedTextSize Returns or sets the fixed text size.
SolvingTolerance Returns or sets the sketch solving tolerance.
TextSizeFixed Returns or sets the option that controls if the text size should be fixed.
UseSolvingTolerance Returns or sets the sketch solving tolerance flag.

Methods

Method Description
ApplySketchPreferences Applies sketch preferences set by user.

Enumerations

SketchPreferencesDimensionLabelType Enumeration Describes the different options for displaying dimension labels.

Property Detail

ConstraintSymbolSize

SketchPreferences.ConstraintSymbolSize

Returns or sets the constraint symbol size

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

Getter Method

Signature ConstraintSymbolSize()

Returns:
Return type:float

New in version NX8.5.0.

License requirements: None.

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

Setter Method

Signature ConstraintSymbolSize(constraintSize)

Parameters:constraintSize (float) –

New in version NX8.5.0.

License requirements: solid_modeling (“SOLIDS MODELING”) OR drafting (“DRAFTING”) OR geometric_tol (“GDT”)

ContinuousAutoDimensioningSetting

SketchPreferences.ContinuousAutoDimensioningSetting

Returns or sets the option to set continuous auto dimensioning in a sketch on or off.

If the option is true (On) then the auto dimensioner will be automatically executed right after an individual curve is created in a sketch.

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

Getter Method

Signature ContinuousAutoDimensioningSetting()

Returns:
Return type:bool

New in version NX7.5.0.

License requirements: None.

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

Setter Method

Signature ContinuousAutoDimensioningSetting(autoDim)

Parameters:autoDim (bool) –

New in version NX7.5.0.

License requirements: solid_modeling (“SOLIDS MODELING”) OR drafting (“DRAFTING”) OR geometric_tol (“GDT”)

CreateInferredConstraints

SketchPreferences.CreateInferredConstraints

Returns or sets the option to control if inferred constraints are automatically created when curves and points are created in the sketch.

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

Getter Method

Signature CreateInferredConstraints()

Returns:
Return type:bool

New in version NX6.0.0.

License requirements: None.

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

Setter Method

Signature CreateInferredConstraints(createInferredConstraints)

Parameters:createInferredConstraints (bool) –

New in version NX6.0.0.

License requirements: solid_modeling (“SOLIDS MODELING”) OR drafting (“DRAFTING”) OR geometric_tol (“GDT”)

DimensionLabel

SketchPreferences.DimensionLabel

Returns or sets the dimension label.

Controls how expressions in sketch dimensions are displayed

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

Getter Method

Signature DimensionLabel()

Returns:
Return type:NXOpen.Preferences.SketchPreferencesDimensionLabelType

New in version NX3.0.0.

License requirements: None.

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

Setter Method

Signature DimensionLabel(dimensionLabel)

Parameters:dimensionLabel (NXOpen.Preferences.SketchPreferencesDimensionLabelType) –

New in version NX3.0.0.

License requirements: None.

DisplayObjectColor

SketchPreferences.DisplayObjectColor

Returns or sets the toggle that controls whether objects are displayed in their actual color in sketch

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

Getter Method

Signature DisplayObjectColor()

Returns:
Return type:bool

New in version NX4.0.0.

License requirements: None.

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

Setter Method

Signature DisplayObjectColor(displayObjectColor)

Parameters:displayObjectColor (bool) –

New in version NX4.0.0.

License requirements: solid_modeling (“SOLIDS MODELING”) OR drafting (“DRAFTING”) OR geometric_tol (“GDT”)

DisplayObjectName

SketchPreferences.DisplayObjectName

Returns or sets the toggle that controls whether objects are displayed with their names in sketch

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

Getter Method

Signature DisplayObjectName()

Returns:
Return type:bool

New in version NX9.0.0.

License requirements: None.

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

Setter Method

Signature DisplayObjectName(displayObjectName)

Parameters:displayObjectName (bool) –

New in version NX9.0.0.

License requirements: solid_modeling (“SOLIDS MODELING”) OR drafting (“DRAFTING”) OR geometric_tol (“GDT”)

FixedTextSize

SketchPreferences.FixedTextSize

Returns or sets the fixed text size.

It is the visible dimension size when text size fixed is enabled.

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

Getter Method

Signature FixedTextSize()

Returns:
Return type:float

New in version NX6.0.0.

License requirements: None.

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

Setter Method

Signature FixedTextSize(fixedTextSize)

Parameters:fixedTextSize (float) –

New in version NX6.0.0.

License requirements: solid_modeling (“SOLIDS MODELING”) OR drafting (“DRAFTING”) OR geometric_tol (“GDT”)

SolvingTolerance

SketchPreferences.SolvingTolerance

Returns or sets the sketch solving tolerance.

This specifies the maximum allowable distance between two objects when solving the sketch constraints for the given sketch. The tolerance value must be greater than 1e-08.

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

Getter Method

Signature SolvingTolerance()

Returns:
Return type:float

New in version NX8.5.0.

License requirements: None.

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

Setter Method

Signature SolvingTolerance(tolerance)

Parameters:tolerance (float) –

New in version NX8.5.0.

License requirements: solid_modeling (“SOLIDS MODELING”) OR drafting (“DRAFTING”) OR geometric_tol (“GDT”)

TextSizeFixed

SketchPreferences.TextSizeFixed

Returns or sets the option that controls if the text size should be fixed.

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

Getter Method

Signature TextSizeFixed()

Returns:
Return type:bool

New in version NX6.0.0.

License requirements: None.

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

Setter Method

Signature TextSizeFixed(textSizeFixed)

Parameters:textSizeFixed (bool) –

New in version NX6.0.0.

License requirements: solid_modeling (“SOLIDS MODELING”) OR drafting (“DRAFTING”) OR geometric_tol (“GDT”)

UseSolvingTolerance

SketchPreferences.UseSolvingTolerance

Returns or sets the sketch solving tolerance flag.

Controls whether to use user input for sketch tolerance

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

Getter Method

Signature UseSolvingTolerance()

Returns:
Return type:bool

New in version NX8.5.0.

License requirements: None.

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

Setter Method

Signature UseSolvingTolerance(useTolerance)

Parameters:useTolerance (bool) –

New in version NX8.5.0.

License requirements: solid_modeling (“SOLIDS MODELING”) OR drafting (“DRAFTING”) OR geometric_tol (“GDT”)

Method Detail

ApplySketchPreferences

SketchPreferences.ApplySketchPreferences

Applies sketch preferences set by user.

The dimDisplayFlag is the API version of the UI setting of Retain Dimensions which was last available for use in NX 6. The setting still exists in the UI for legacy parts that have a sketch with Retain Dimensions enabled. However, once the setting is turned off, it cannot be turned on again. This functionality is replaced by NXOpen.Annotations.AnnotationManager.MakePmi in an active sketch or NXOpen.Features.EditDimensionBuilder.DisplayAsPmi` when not in an active sketch.

Signature ApplySketchPreferences(dimDisplayFlag)

Parameters:dimDisplayFlag (int) – If sketch dimensions are already displayed outside of an active sketch, Set 0 to turn off the display of dimensions outside of the active sketch.

New in version NX3.0.0.

License requirements: None.