RealScale Class

class NXOpen.UIStyler.RealScale

Bases: NXOpen.UIStyler.StylerItem

Represents a RealScale for UI Styler

New in version NX5.0.0.

Properties

Property Description
ItemValue Returns or sets the item value
Sensitivity Returns or sets the sensitivity
Visibility Returns or sets the visibility

Methods

Method Description
AddDragHandler Registers dtag callback.
AddValueChangedHandler Called when a dialog user moves the slider up and down the scale.
Dispose Free resources associated with the instance.
GetItemType Gets the dialog item type.
InitializeAttachment Returns initialized dialog item attachment information
IsEqualTo Equates two styler items
SetAttachment Specifies the updated dialog item attachment information
SetDecimalPrecision Sets decimal precision
SetLabels Sets labels
SetLimits Sets limits

Property Detail

ItemValue

RealScale.ItemValue

Returns or sets the item value

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

Getter Method

Signature ItemValue

Returns:
Return type:float

New in version NX5.0.0.

License requirements: None.

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

Setter Method

Signature ItemValue

Parameters:itemVal (float) – New real value for the slider. It must be within the min/max range

New in version NX5.0.0.

License requirements: None.

Sensitivity

RealScale.Sensitivity

Returns or sets the sensitivity

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

Getter Method

Signature Sensitivity

Returns:
Return type:bool

New in version NX5.0.0.

License requirements: None.

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

Setter Method

Signature Sensitivity

Parameters:type (bool) – TRUE if sensitive, FALSE if insensitive

New in version NX5.0.0.

License requirements: None.

Visibility

RealScale.Visibility

Returns or sets the visibility

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

Getter Method

Signature Visibility

Returns:
Return type:bool

New in version NX5.0.0.

License requirements: None.

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

Setter Method

Signature Visibility

Parameters:type (bool) – TRUE if visible, FALSE if invisible

New in version NX5.0.0.

License requirements: None.

Method Detail

AddDragHandler

RealScale.AddDragHandler

Registers dtag callback.

This method should be called before calling UIStyler.Dialog.Show() or UIStyler.Dialog.RegisterWithUiMenu()

Signature AddDragHandler(dragevent, isDialogLaunchingEvent)

Parameters:
  • dragevent (CallableObject) – Callback for add drag event
  • isDialogLaunchingEvent (bool) – TRUE if dialog is going to launch, FALSE if not

New in version NX5.0.0.

License requirements: None.

AddValueChangedHandler

RealScale.AddValueChangedHandler

Called when a dialog user moves the slider up and down the scale.

For example, if a user moves the slider from 0.0 to 10.0, the dialog calls the drag callback 100 times, one for each value that the slider moves across. Do not terminate the dialog with a drag callback. The dialog should always return UF_UI_CB_CONTINUE_DIALOG.

Signature AddValueChangedHandler(valuechangedevent, isDialogLaunchingEvent)

Parameters:
  • valuechangedevent (CallableObject) – Callback for value changed event
  • isDialogLaunchingEvent (bool) – TRUE if dialog is going to launch, FALSE if not

New in version NX5.0.0.

License requirements: None.

SetDecimalPrecision

RealScale.SetDecimalPrecision

Sets decimal precision

Signature SetDecimalPrecision(digits)

Parameters:digits (int) – The number significant digits

New in version NX5.0.0.

License requirements: None.

SetLabels

RealScale.SetLabels

Sets labels

Signature SetLabels(minimumLabel, maximumLabel)

Parameters:
  • minimumLabel (str) – String minimum label
  • maximumLabel (str) – String maximum label

New in version NX5.0.0.

License requirements: None.

SetLimits

RealScale.SetLimits

Sets limits

Signature SetLimits(minimumValue, maximumValue)

Parameters:
  • minimumValue (float) – Real minimum value
  • maximumValue (float) – Real maximum value

New in version NX5.0.0.

License requirements: None.