SessionSketch Class

class NXOpen.Preferences.SessionSketch

Bases: object

Represents the set of sketch preferences applicable to entire session

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

New in version NX3.0.0.

Properties

Property Description
AutoDimensionsToArcCenter Returns or sets the setting that controls whether or not auto-dimensions are created to arc centers.
BackgroundOption Returns or sets the background option
ChangeViewOrientation Returns or sets the setting that controls whether the view orientation will be changed to align with the sketch when the sketch is activated.
ConstraintSymbolSize Returns or sets the constraint symbol size.
ContinuousAutoDimensioning 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 to create inferred constraints
DefaultArcNamePrefix Returns or sets the default arc name prefix
DefaultConicNamePrefix Returns or sets the default conic name prefix
DefaultLineNamePrefix Returns or sets the default line name prefix
DefaultSketchNamePrefix Returns or sets the default sketch name prefix
DefaultSplineNamePrefix Returns or sets the default spline name prefix
DefaultVertexNamePrefix Returns or sets the default vertex name prefix
DelayEvaluation Returns or sets the setting that controls whether or not the sketch should be evaluated when a constraint is added to the sketch.
DimensionLabel Returns or sets the dimension label
DisplayAutoDimensions Returns or sets the setting that controls whether or not to display auto dimensions
DisplayConstraintSymbols Returns or sets the setting that controls whether or not to display constraint symbols
DisplayDOFArrows Returns or sets the setting that controls whether or not the degree of freedom arrows are displayed.
DisplayObjectColor Returns or sets the setting that controls whether or not sketch objects should be displayed in their true color
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 to display parentheses on reference dimensions
DisplayReferenceGeometry Returns or sets the setting that controls whether or not the reference geometry are displayed on inactive sketches.
DisplaySectionMappingWarning Returns or sets the display section mapping warning flag.
DisplayVertices Returns or sets the setting that controls whether or not to display sketch vertices.
DynamicConstraintDisplay Returns or sets the setting that controls whether or not constraint symbols are displayed if the associated geometry is very small.
FixedTextSize Returns or sets the dimension text size when the text size fixed flag is set.
GroupConstraintOption Returns or sets the sketch group external constraint management option
MaintainBlankStatus Returns or sets the setting that controls whether or not previously blanked objects will be visible when a sketch is activated
MaintainLayerStatus Returns or sets the setting that controls whether or not the work layer remains the same or returns to its previous value when a sketch is deactivated.
OriginOption Returns or sets the origin option
RetainDimensions Returns or sets the retain dimensions flag.
RigidSetConstraintOption Returns or sets the rigid set external constraint management option
ScaleOnFirstDrivingDimension Returns or sets the setting that controls whether or not the entire active sketch is scaled about the sketch origin when the first non-angular driving dimension is applied.
SnapAngle Returns or sets the snap angle.
SolvingTolerance Returns or sets the sketch solving tolerance.
TextSizeFixed Returns or sets the setting that controls whether or not dimension text size is fixed.
UpdateSketchOnly Returns or sets the setting that controls whether or not to update only the sketch while sketching using Direct Sketch.
UseSolvingTolerance Returns or sets the setting that controls whether or not to use user input for sketch solving tolerance.

Methods

Enumerations

SessionSketchBackgroundType Enumeration Describes the available sketch background types.
SessionSketchGroupConstraintType Enumeration Represents the constraint management option when creating a rigid or scalable sketch group.
SessionSketchOriginType Enumeration Describes the available sketch origin types.
SessionSketchRigidSetConstraintType Enumeration Represents the constraint management option when creating a rigid sketch group.

Property Detail

AutoDimensionsToArcCenter

SessionSketch.AutoDimensionsToArcCenter

Returns or sets the setting that controls whether or not auto-dimensions are created to arc centers.

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

Getter Method

Signature AutoDimensionsToArcCenter

Returns:
Return type:bool

New in version NX7.5.0.

License requirements: None.

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

Setter Method

Signature AutoDimensionsToArcCenter

Parameters:toArcCenter (bool) –

New in version NX7.5.0.

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

BackgroundOption

SessionSketch.BackgroundOption

Returns or sets the background option

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

Getter Method

Signature BackgroundOption

Returns:
Return type:NXOpen.Preferences.SessionSketchBackgroundType

New in version NX5.0.0.

License requirements: None.

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

Setter Method

Signature BackgroundOption

Parameters:backgroundType (NXOpen.Preferences.SessionSketchBackgroundType) –

New in version NX5.0.0.

License requirements: None.

ChangeViewOrientation

SessionSketch.ChangeViewOrientation

Returns or sets the setting that controls whether the view orientation will be changed to align with the sketch when the sketch is activated.

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

Getter Method

Signature ChangeViewOrientation

Returns:
Return type:bool

New in version NX3.0.0.

License requirements: None.

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

Setter Method

Signature ChangeViewOrientation

Parameters:changeViewOrientation (bool) –

New in version NX3.0.0.

License requirements: None.

ConstraintSymbolSize

SessionSketch.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

Parameters:constraintSymbolSize (float) –

New in version NX8.5.0.

License requirements: None.

ContinuousAutoDimensioning

SessionSketch.ContinuousAutoDimensioning

Returns or sets the setting that controls whether or not to continuously create auto dimensions in a sketch.

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

Getter Method

Signature ContinuousAutoDimensioning

Returns:
Return type:bool

New in version NX7.5.0.

License requirements: None.

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

Setter Method

Signature ContinuousAutoDimensioning

Parameters:continAutoDim (bool) –

New in version NX7.5.0.

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

CreateInferredConstraints

SessionSketch.CreateInferredConstraints

Returns or sets the setting that controls whether or not to create inferred constraints

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

Getter Method

Signature CreateInferredConstraints

Returns:
Return type:bool

New in version NX6.0.0.

License requirements: None.

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

Setter Method

Signature CreateInferredConstraints

Parameters:createInferredConstraints (bool) –

New in version NX6.0.0.

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

DefaultArcNamePrefix

SessionSketch.DefaultArcNamePrefix

Returns or sets the default arc name prefix

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

Getter Method

Signature DefaultArcNamePrefix

Returns:
Return type:str

New in version NX3.0.0.

License requirements: None.

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

Setter Method

Signature DefaultArcNamePrefix

Parameters:defaultArcNamePrefix (str) –

New in version NX3.0.0.

License requirements: None.

DefaultConicNamePrefix

SessionSketch.DefaultConicNamePrefix

Returns or sets the default conic name prefix

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

Getter Method

Signature DefaultConicNamePrefix

Returns:
Return type:str

New in version NX3.0.0.

License requirements: None.

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

Setter Method

Signature DefaultConicNamePrefix

Parameters:defaultConicNamePrefix (str) –

New in version NX3.0.0.

License requirements: None.

DefaultLineNamePrefix

SessionSketch.DefaultLineNamePrefix

Returns or sets the default line name prefix

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

Getter Method

Signature DefaultLineNamePrefix

Returns:
Return type:str

New in version NX3.0.0.

License requirements: None.

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

Setter Method

Signature DefaultLineNamePrefix

Parameters:defaultLineNamePrefix (str) –

New in version NX3.0.0.

License requirements: None.

DefaultSketchNamePrefix

SessionSketch.DefaultSketchNamePrefix

Returns or sets the default sketch name prefix

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

Getter Method

Signature DefaultSketchNamePrefix

Returns:
Return type:str

New in version NX3.0.0.

License requirements: None.

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

Setter Method

Signature DefaultSketchNamePrefix

Parameters:defaultSketchNamePrefix (str) –

New in version NX3.0.0.

License requirements: None.

DefaultSplineNamePrefix

SessionSketch.DefaultSplineNamePrefix

Returns or sets the default spline name prefix

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

Getter Method

Signature DefaultSplineNamePrefix

Returns:
Return type:str

New in version NX3.0.0.

License requirements: None.

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

Setter Method

Signature DefaultSplineNamePrefix

Parameters:defaultSplineNamePrefix (str) –

New in version NX3.0.0.

License requirements: None.

DefaultVertexNamePrefix

SessionSketch.DefaultVertexNamePrefix

Returns or sets the default vertex name prefix

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

Getter Method

Signature DefaultVertexNamePrefix

Returns:
Return type:str

New in version NX3.0.0.

License requirements: None.

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

Setter Method

Signature DefaultVertexNamePrefix

Parameters:defaultVertexNamePrefix (str) –

New in version NX3.0.0.

License requirements: None.

DelayEvaluation

SessionSketch.DelayEvaluation

Returns or sets the setting that controls whether or not the sketch should be evaluated when a constraint is added to the sketch.

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

Getter Method

Signature DelayEvaluation

Returns:
Return type:bool

New in version NX3.0.0.

License requirements: None.

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

Setter Method

Signature DelayEvaluation

Parameters:delayEvaluation (bool) –

New in version NX3.0.0.

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

DimensionLabel

SessionSketch.DimensionLabel

Returns or sets the dimension label

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

Getter Method

Signature DimensionLabel

Returns:
Return type:NXOpen.Preferences.SketchPreferencesDimensionLabelType

New in version NX3.0.0.

License requirements: None.

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

Setter Method

Signature DimensionLabel

Parameters:dimensionLabel (NXOpen.Preferences.SketchPreferencesDimensionLabelType) –

New in version NX3.0.0.

License requirements: None.

DisplayAutoDimensions

SessionSketch.DisplayAutoDimensions

Returns or sets the setting that controls whether or not to display auto dimensions

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

Getter Method

Signature DisplayAutoDimensions

Returns:
Return type:bool

New in version NX11.0.0.

License requirements: None.

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

Setter Method

Signature DisplayAutoDimensions

Parameters:displayAutoDimensions (bool) –

New in version NX11.0.0.

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

DisplayConstraintSymbols

SessionSketch.DisplayConstraintSymbols

Returns or sets the setting that controls whether or not to display constraint symbols

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

Getter Method

Signature DisplayConstraintSymbols

Returns:
Return type:bool

New in version NX8.5.0.

License requirements: None.

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

Setter Method

Signature DisplayConstraintSymbols

Parameters:displayConstraintSymbols (bool) –

New in version NX8.5.0.

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

DisplayDOFArrows

SessionSketch.DisplayDOFArrows

Returns or sets the setting that controls whether or not the degree of freedom arrows are displayed.

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

Getter Method

Signature DisplayDOFArrows

Returns:
Return type:bool

New in version NX3.0.0.

License requirements: None.

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

Setter Method

Signature DisplayDOFArrows

Parameters:displayDOFArrows (bool) –

New in version NX3.0.0.

License requirements: None.

DisplayObjectColor

SessionSketch.DisplayObjectColor

Returns or sets the setting that controls whether or not sketch objects should be displayed in their true color

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

Getter Method

Signature DisplayObjectColor

Returns:
Return type:bool

New in version NX6.0.0.

License requirements: None.

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

Setter Method

Signature DisplayObjectColor

Parameters:displayObjColor (bool) –

New in version NX6.0.0.

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

DisplayObjectName

SessionSketch.DisplayObjectName

Returns or sets the setting that controls whether or not 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

Parameters:displayObjectName (bool) –

New in version NX9.0.0.

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

DisplayParenthesesOnReferenceDimensions

SessionSketch.DisplayParenthesesOnReferenceDimensions

Returns or sets the setting that controls whether or not to display parentheses on reference dimensions

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

Getter Method

Signature DisplayParenthesesOnReferenceDimensions

Returns:
Return type:bool

New in version NX11.0.1.

License requirements: None.

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

Setter Method

Signature DisplayParenthesesOnReferenceDimensions

Parameters:displayParentheses (bool) –

New in version NX11.0.1.

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

DisplayReferenceGeometry

SessionSketch.DisplayReferenceGeometry

Returns or sets the setting that controls whether or not the reference geometry are displayed on inactive sketches.

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

Getter Method

Signature DisplayReferenceGeometry

Returns:
Return type:bool

New in version NX11.0.1.

License requirements: None.

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

Setter Method

Signature DisplayReferenceGeometry

Parameters:displayReferenceGeometry (bool) –

New in version NX11.0.1.

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

DisplaySectionMappingWarning

SessionSketch.DisplaySectionMappingWarning

Returns or sets the display section mapping warning flag.

If this is true, when user exits sketcher, would get a warning that some dependent feature section may require mapping

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

Getter Method

Signature DisplaySectionMappingWarning

Returns:
Return type:bool

New in version NX7.5.0.

License requirements: None.

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

Setter Method

Signature DisplaySectionMappingWarning

Parameters:displaySectionMappingWarning (bool) –

New in version NX7.5.0.

License requirements: None.

DisplayVertices

SessionSketch.DisplayVertices

Returns or sets the setting that controls whether or not to display sketch vertices.

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

Getter Method

Signature DisplayVertices

Returns:
Return type:bool

New in version NX11.0.0.

License requirements: None.

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

Setter Method

Signature DisplayVertices

Parameters:displayVertices (bool) –

New in version NX11.0.0.

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

DynamicConstraintDisplay

SessionSketch.DynamicConstraintDisplay

Returns or sets the setting that controls whether or not constraint symbols are displayed if the associated geometry is very small.

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

Getter Method

Signature DynamicConstraintDisplay

Returns:
Return type:bool

New in version NX3.0.0.

License requirements: None.

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

Setter Method

Signature DynamicConstraintDisplay

Parameters:dynamicConstraintDisplay (bool) –

New in version NX3.0.0.

License requirements: None.

FixedTextSize

SessionSketch.FixedTextSize

Returns or sets the dimension text size when the text size fixed flag is set.

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

Getter Method

Signature FixedTextSize

Returns:
Return type:float

New in version NX6.0.0.

License requirements: None.

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

Setter Method

Signature FixedTextSize

Parameters:fixedTextSize (float) –

New in version NX6.0.0.

License requirements: None.

GroupConstraintOption

SessionSketch.GroupConstraintOption

Returns or sets the sketch group external constraint management option

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

Getter Method

Signature GroupConstraintOption

Returns:
Return type:NXOpen.Preferences.SessionSketchGroupConstraintType

New in version NX11.0.0.

License requirements: None.

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

Setter Method

Signature GroupConstraintOption

Parameters:constraintType (NXOpen.Preferences.SessionSketchGroupConstraintType) –

New in version NX11.0.0.

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

MaintainBlankStatus

SessionSketch.MaintainBlankStatus

Returns or sets the setting that controls whether or not previously blanked objects will be visible when a sketch is activated

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

Getter Method

Signature MaintainBlankStatus

Returns:
Return type:bool

New in version NX6.0.0.

License requirements: None.

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

Setter Method

Signature MaintainBlankStatus

Parameters:keepBlank (bool) –

New in version NX6.0.0.

License requirements: None.

MaintainLayerStatus

SessionSketch.MaintainLayerStatus

Returns or sets the setting that controls whether or not the work layer remains the same or returns to its previous value when a sketch is deactivated.

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

Getter Method

Signature MaintainLayerStatus

Returns:
Return type:bool

New in version NX3.0.0.

License requirements: None.

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

Setter Method

Signature MaintainLayerStatus

Parameters:maintainLayerStatus (bool) –

New in version NX3.0.0.

License requirements: None.

OriginOption

SessionSketch.OriginOption

Returns or sets the origin option

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

Getter Method

Signature OriginOption

Returns:
Return type:NXOpen.Preferences.SessionSketchOriginType

New in version NX5.0.0.

Deprecated since version NX8.0.0: Use SketchInPlaceBuilder.ProjectWorkPartOrigin() and SketchInPlaceBuilder.MakeOriginAssociative() and SketchInPlaceBuilder.SketchOrigin() instead.

License requirements: None.

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

Setter Method

Signature OriginOption

Parameters:originType (NXOpen.Preferences.SessionSketchOriginType) –

New in version NX5.0.0.

Deprecated since version NX8.0.0: Use SketchInPlaceBuilder.ProjectWorkPartOrigin() and SketchInPlaceBuilder.MakeOriginAssociative() and SketchInPlaceBuilder.SketchOrigin() instead.

License requirements: None.

RetainDimensions

SessionSketch.RetainDimensions

Returns or sets the retain dimensions flag.

If it is True, sketch dimensions continue to display after a sketch is deactivated.

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

Getter Method

Signature RetainDimensions

Returns:
Return type:bool

New in version NX3.0.0.

Deprecated since version NX8.0.1: Use Annotations.AnnotationManager.MakePmi() and Annotations.AnnotationManager.RemovePmi() with individual dimensions instead.

License requirements: None.

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

Setter Method

Signature RetainDimensions

Parameters:retainDimensions (bool) –

New in version NX3.0.0.

Deprecated since version NX8.0.1: Use Annotations.AnnotationManager.MakePmi() and Annotations.AnnotationManager.RemovePmi() with individual dimensions instead.

License requirements: None.

RigidSetConstraintOption

SessionSketch.RigidSetConstraintOption

Returns or sets the rigid set external constraint management option

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

Getter Method

Signature RigidSetConstraintOption

Returns:
Return type:NXOpen.Preferences.SessionSketchRigidSetConstraintType

New in version NX9.0.0.

Deprecated since version NX11.0.0: Use NXOpen.Preferences.SessionSketch.GroupConstraintOption() instead.

License requirements: None.

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

Setter Method

Signature RigidSetConstraintOption

Parameters:constraintType (NXOpen.Preferences.SessionSketchRigidSetConstraintType) –

New in version NX9.0.0.

Deprecated since version NX11.0.0: Use NXOpen.Preferences.SessionSketch.GroupConstraintOption() instead.

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

ScaleOnFirstDrivingDimension

SessionSketch.ScaleOnFirstDrivingDimension

Returns or sets the setting that controls whether or not the entire active sketch is scaled about the sketch origin when the first non-angular driving dimension is applied.

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

Getter Method

Signature ScaleOnFirstDrivingDimension

Returns:
Return type:bool

New in version NX11.0.0.

License requirements: None.

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

Setter Method

Signature ScaleOnFirstDrivingDimension

Parameters:scaleOnFirstDrivingDimension (bool) –

New in version NX11.0.0.

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

SnapAngle

SessionSketch.SnapAngle

Returns or sets the snap angle.

This is snap angle tolerance for vertical, horizontal, parallel, and perpendicular lines.The default value is 3 and maximum value is 20

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

Getter Method

Signature SnapAngle

Returns:
Return type:float

New in version NX3.0.0.

License requirements: None.

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

Setter Method

Signature SnapAngle

Parameters:snapAngle (float) –

New in version NX3.0.0.

License requirements: None.

SolvingTolerance

SessionSketch.SolvingTolerance

Returns or sets the sketch solving tolerance.

This specifies the maximum allowable distance when solving the sketch constraints. 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

Parameters:tolerance (float) –

New in version NX8.5.0.

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

TextSizeFixed

SessionSketch.TextSizeFixed

Returns or sets the setting that controls whether or not dimension text size is fixed.

If it is True, text size adjusts opposite of zoom scale so that dimensions appear a constant size.

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

Getter Method

Signature TextSizeFixed

Returns:
Return type:bool

New in version NX4.0.0.

License requirements: None.

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

Setter Method

Signature TextSizeFixed

Parameters:textSizeFixed (bool) –

New in version NX4.0.0.

License requirements: None.

UpdateSketchOnly

SessionSketch.UpdateSketchOnly

Returns or sets the setting that controls whether or not to update only the sketch while sketching using Direct Sketch.

When this preference is set to false, an update will propagate through the whole model

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

Getter Method

Signature UpdateSketchOnly

Returns:
Return type:bool

New in version NX8.0.0.

License requirements: None.

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

Setter Method

Signature UpdateSketchOnly

Parameters:delayModelUpdate (bool) –

New in version NX8.0.0.

License requirements: solid_modeling (“SOLIDS MODELING”)

UseSolvingTolerance

SessionSketch.UseSolvingTolerance

Returns or sets the setting that controls whether or not to use user input for sketch solving tolerance.

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

Getter Method

Signature UseSolvingTolerance

Returns:
Return type:bool

New in version NX8.5.0.

License requirements: None.

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

Setter Method

Signature UseSolvingTolerance

Parameters:useTolerance (bool) –

New in version NX8.5.0.

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