SketchPreferences Class¶
-
class
NXOpen.Preferences.SketchPreferences¶ Bases:
objectRepresents the set of sketch preferences applicable on
NXOpen.SketchobjectTo obtain an instance of this class, refer to
NXOpen.SketchNew in version NX3.0.0.
Properties¶
| Property | Description |
|---|---|
| ConstraintSymbolSize | Returns or sets the constraint symbol size |
| ContinuousAutoDimensioningSetting | Returns or sets the setting that controls whether or not to continuously create auto dimensions in a sketch. |
| CreateInferredConstraints | Returns or sets the setting that controls whether or not 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 setting that controls whether or not objects are displayed in their actual color in sketch |
| DisplayObjectName | Returns or sets the setting that controls whether or not objects are displayed with their names in sketch. |
| DisplayParenthesesOnReferenceDimensions | Returns or sets the setting that controls whether or not parentheses are displayed on reference dimensions. |
| DisplayReferenceGeometry | Returns or sets the setting that controls whether or not the reference geometry are displayed on inactive sketches |
| DisplayVertices | Returns or sets the setting that controls whether or not vertices are displayed in an active sketch. |
| FixedTextSize | Returns or sets the fixed text size. |
| SolvingTolerance | Returns or sets the sketch solving tolerance. |
| TextSizeFixed | Returns or sets the setting that controls whether or not the dimension text size should be fixed. |
| UseSolvingTolerance | Returns or sets the setting that controls whether or not to use user input for sketch solving tolerance. |
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
ConstraintSymbolSizeReturns: Return type: float New in version NX8.5.0.
License requirements: None.
-------------------------------------Setter Method
Signature
ConstraintSymbolSizeParameters: 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 setting that controls whether or not to continuously create auto dimensions in a sketch.
If the option is true (On) then the auto dimensioner will be automatically executed after an individual curve is created in a sketch.
-------------------------------------Getter Method
Signature
ContinuousAutoDimensioningSettingReturns: Return type: bool New in version NX7.5.0.
License requirements: None.
-------------------------------------Setter Method
Signature
ContinuousAutoDimensioningSettingParameters: 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 setting that controls whether or not inferred constraints are automatically created when curves and points are created in the sketch.
-------------------------------------Getter Method
Signature
CreateInferredConstraintsReturns: Return type: bool New in version NX6.0.0.
License requirements: None.
-------------------------------------Setter Method
Signature
CreateInferredConstraintsParameters: 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
DimensionLabelReturns: Return type: NXOpen.Preferences.SketchPreferencesDimensionLabelTypeNew in version NX3.0.0.
License requirements: None.
-------------------------------------Setter Method
Signature
DimensionLabelParameters: dimensionLabel ( NXOpen.Preferences.SketchPreferencesDimensionLabelType) –New in version NX3.0.0.
License requirements: None.
DisplayObjectColor¶
-
SketchPreferences.DisplayObjectColor¶ Returns or sets the setting that controls whether or not objects are displayed in their actual color in sketch
-------------------------------------Getter Method
Signature
DisplayObjectColorReturns: Return type: bool New in version NX4.0.0.
License requirements: None.
-------------------------------------Setter Method
Signature
DisplayObjectColorParameters: 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 setting that controls whether or not objects are displayed with their names in sketch.
-------------------------------------Getter Method
Signature
DisplayObjectNameReturns: Return type: bool New in version NX9.0.0.
License requirements: None.
-------------------------------------Setter Method
Signature
DisplayObjectNameParameters: displayObjectName (bool) – New in version NX9.0.0.
License requirements: solid_modeling (“SOLIDS MODELING”) OR drafting (“DRAFTING”) OR geometric_tol (“GDT”)
DisplayParenthesesOnReferenceDimensions¶
-
SketchPreferences.DisplayParenthesesOnReferenceDimensions¶ Returns or sets the setting that controls whether or not parentheses are displayed on reference dimensions.
-------------------------------------Getter Method
Signature
DisplayParenthesesOnReferenceDimensionsReturns: Return type: bool New in version NX11.0.1.
License requirements: None.
-------------------------------------Setter Method
Signature
DisplayParenthesesOnReferenceDimensionsParameters: displayParentheses (bool) – New in version NX11.0.1.
License requirements: solid_modeling (“SOLIDS MODELING”) OR drafting (“DRAFTING”) OR geometric_tol (“GDT”)
DisplayReferenceGeometry¶
-
SketchPreferences.DisplayReferenceGeometry¶ Returns or sets the setting that controls whether or not the reference geometry are displayed on inactive sketches
-------------------------------------Getter Method
Signature
DisplayReferenceGeometryReturns: Return type: bool New in version NX11.0.1.
License requirements: None.
-------------------------------------Setter Method
Signature
DisplayReferenceGeometryParameters: displayReferenceGeometry (bool) – New in version NX11.0.1.
License requirements: solid_modeling (“SOLIDS MODELING”) OR drafting (“DRAFTING”) OR geometric_tol (“GDT”)
DisplayVertices¶
-
SketchPreferences.DisplayVertices¶ Returns or sets the setting that controls whether or not vertices are displayed in an active sketch.
-------------------------------------Getter Method
Signature
DisplayVerticesReturns: Return type: bool New in version NX11.0.0.
License requirements: None.
-------------------------------------Setter Method
Signature
DisplayVerticesParameters: displayVertices (bool) – New in version NX11.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
FixedTextSizeReturns: Return type: float New in version NX6.0.0.
License requirements: None.
-------------------------------------Setter Method
Signature
FixedTextSizeParameters: 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
SolvingToleranceReturns: Return type: float New in version NX8.5.0.
License requirements: None.
-------------------------------------Setter Method
Signature
SolvingToleranceParameters: 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 setting that controls whether or not the dimension text size should be fixed.
-------------------------------------Getter Method
Signature
TextSizeFixedReturns: Return type: bool New in version NX6.0.0.
License requirements: None.
-------------------------------------Setter Method
Signature
TextSizeFixedParameters: 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 setting that controls whether or not to use user input for sketch solving tolerance.
-------------------------------------Getter Method
Signature
UseSolvingToleranceReturns: Return type: bool New in version NX8.5.0.
License requirements: None.
-------------------------------------Setter Method
Signature
UseSolvingToleranceParameters: 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 orNXOpen.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.