UserDefinedClass Class

class NXOpen.UserDefinedObjects.UserDefinedClass

Bases: NXOpen.TransientObject

JA interface for the UserDefinedClass object

To create a new instance of this class, use NXOpen.UserDefinedObjects.UserDefinedClassManager.NewUserDefinedClass()

New in version NX5.0.0.

Properties

Property Description
AllowOwnedObjectSelectionOption Returns or sets the allow owned object selection flag.
AllowQueryClassFromName Returns or sets the allow query class from name flag.
ClassName Returns the class name of the NXOpen.UserDefinedObjects.UserDefinedClass.
FriendlyName Returns the friendly name of the NXOpen.UserDefinedObjects.UserDefinedClass.
WarnUserFlag Returns or sets the warn user flag.

Methods

Method Description
AddAttentionPointHandler Registers the attention point callback.
AddDeleteHandler Registers the delete callback.
AddDisplayHandler Registers UDO display callback.
AddEditHandler Registers the edit callback.
AddFitHandler Registers the fit callback.
AddInformationHandler Registers the information callback.
AddScreenSizeFitHandler Registers the screen size fit callback.
AddSelectionHandler Registers the UDO selection callback.
AddSuppressHandler Registers the suppress callback.
AddUpdateHandler Registers the update callback.
Dispose Frees the memory associated with this object.
GetIsOccurrenceableFlag Gets the is occurrenceable flag for this class.
SetIsOccurrenceableFlag Sets the is occurrenceable flag for this class.

Enumerations

UserDefinedClassAllowOwnedObjectSelection Enumeration Allow owned object selection on all objects owned by an object of this NXOpen.UserDefinedObjects.UserDefinedClass.
UserDefinedClassAllowQueryClass Enumeration Allow query class from name options for a NXOpen.UserDefinedObjects.UserDefinedObject of this class.
UserDefinedClassSelection Enumeration Allow query class from name options for a NXOpen.UserDefinedObjects.UserDefinedObject.

Property Detail

AllowOwnedObjectSelectionOption

UserDefinedClass.AllowOwnedObjectSelectionOption

Returns or sets the allow owned object selection flag.

Specifies whether or not you have permission to select objects owned by NXOpen.UserDefinedObjects.UserDefinedObject’s of this class.

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

Getter Method

Signature AllowOwnedObjectSelectionOption

Returns:
Return type:NXOpen.UserDefinedObjects.UserDefinedClassAllowOwnedObjectSelection

New in version NX5.0.0.

License requirements: None.

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

Setter Method

Signature AllowOwnedObjectSelectionOption

Parameters:allowOwnedObjectSelectionOption (NXOpen.UserDefinedObjects.UserDefinedClassAllowOwnedObjectSelection) –

New in version NX5.0.0.

License requirements: None.

AllowQueryClassFromName

UserDefinedClass.AllowQueryClassFromName

Returns or sets the allow query class from name flag.

Specifies whether or not you are allowed to query the NXOpen.UserDefinedObjects.UserDefinedObject from the class name.

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

Getter Method

Signature AllowQueryClassFromName

Returns:
Return type:NXOpen.UserDefinedObjects.UserDefinedClassAllowQueryClass

New in version NX5.0.0.

License requirements: None.

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

Setter Method

Signature AllowQueryClassFromName

Parameters:allowQueryClassFromName (NXOpen.UserDefinedObjects.UserDefinedClassAllowQueryClass) –

New in version NX5.0.0.

License requirements: None.

ClassName

UserDefinedClass.ClassName

Returns the class name of the NXOpen.UserDefinedObjects.UserDefinedClass.

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

Getter Method

Signature ClassName

Returns:The real class name (non-displayed, non-user-friendly).
Return type:str

New in version NX5.0.0.

License requirements: None.

FriendlyName

UserDefinedClass.FriendlyName

Returns the friendly name of the NXOpen.UserDefinedObjects.UserDefinedClass.

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

Getter Method

Signature FriendlyName

Returns:The Friendly Name is the displayed class name inside of NX.

For example, if you select an object in NX and filter by type, this is the name shown for type selection :rtype: str

New in version NX5.0.0.

License requirements: None.

WarnUserFlag

UserDefinedClass.WarnUserFlag

Returns or sets the warn user flag.

Specifies the behavior of warning the user if a NXOpen.UserDefinedObjects.UserDefinedObject of the given NXOpen.UserDefinedObjects.UserDefinedClass is found in a part, but the code implementing the methods for the UDO is not loaded. The default action is to not warn the user. If the UDO author sets this flag to TRUE, all UDO’s of this class that are created will be marked so that the user will be warned if the UDO methods have not been loaded, but a UDO of the class is in the part. This warning will be issued to the listing window, when the first object of the given class is retrieved. This warning will only be given once per session.

This flag is set on every UDO object. Therefore for any part, there may be a mixture UDO objects of a given class, some having this flag set to TRUE and some objects having the flag set to FALSE. This is particularly true since all UDO objects created before NX 3.0 will have this flag set to FALSE. If the UDO methods for a class are not loaded, any one UDO with this flag set to TRUE in a part is enough for the warning to be issued to the listing window.

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

Getter Method

Signature WarnUserFlag

Returns:TRUE - the user will be warned when opening a part containing a UDO of this class without first loading it’s required methods. FALSE - the user will NOT be warned.
Return type:bool

New in version NX5.0.0.

License requirements: None.

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

Setter Method

Signature WarnUserFlag

Parameters:warnUser (bool) – TRUE - the user will be warned when opening a part containing a UDO of this class without first loading it’s required methods. FALSE - the user will NOT be warned.

New in version NX5.0.0.

License requirements: None.

Method Detail

AddAttentionPointHandler

UserDefinedClass.AddAttentionPointHandler

Registers the attention point callback.

Signature AddAttentionPointHandler(displayEvent)

Parameters:displayEvent (CallableObject) –

New in version NX5.0.0.

License requirements: None.

AddDeleteHandler

UserDefinedClass.AddDeleteHandler

Registers the delete callback.

Signature AddDeleteHandler(linkEvent)

Parameters:linkEvent (CallableObject) –

New in version NX5.0.0.

License requirements: None.

AddDisplayHandler

UserDefinedClass.AddDisplayHandler

Registers UDO display callback.

Signature AddDisplayHandler(displayEvent)

Parameters:displayEvent (CallableObject) –

New in version NX5.0.0.

License requirements: None.

AddEditHandler

UserDefinedClass.AddEditHandler

Registers the edit callback.

Signature AddEditHandler(udoEvent)

Parameters:udoEvent (CallableObject) –

New in version NX5.0.0.

License requirements: None.

AddFitHandler

UserDefinedClass.AddFitHandler

Registers the fit callback.

Signature AddFitHandler(displayEvent)

Parameters:displayEvent (CallableObject) –

New in version NX5.0.0.

License requirements: None.

AddInformationHandler

UserDefinedClass.AddInformationHandler

Registers the information callback.

Signature AddInformationHandler(udoEvent)

Parameters:udoEvent (CallableObject) –

New in version NX5.0.0.

License requirements: None.

AddScreenSizeFitHandler

UserDefinedClass.AddScreenSizeFitHandler

Registers the screen size fit callback.

The screen size fit callback is called when it is necesary to determine the bounding box of a screen size object (one which remains the same size on the screen independent of the view scale) during a fit computation. As of NX 8.0 the only geometry types supported for User Defined Objects which are screen size are ScreenStandardText and AbsoluteRotationScreenSizeText. If your User Defined Object does not have any of these objects, then you should not call NXOpen.UserDefinedObjects.UserDefinedClass.AddScreenSizeFitHandler() because to do do would incur a performance penalty.

Signature AddScreenSizeFitHandler(displayEvent)

Parameters:displayEvent (CallableObject) –

New in version NX8.0.0.

License requirements: None.

AddSelectionHandler

UserDefinedClass.AddSelectionHandler

Registers the UDO selection callback.

Signature AddSelectionHandler(displayEvent)

Parameters:displayEvent (CallableObject) –

New in version NX5.0.0.

License requirements: None.

AddSuppressHandler

UserDefinedClass.AddSuppressHandler

Registers the suppress callback.

Note this callback is not called unless you have a UDO FEATURE. Also it may not get called when the system automatically suppresses the feature during update.

Also note the user should check the suppression status of the feature in their callback to see if the input udo feature is currently getting suppressed or unsuppressed.

Signature AddSuppressHandler(udoEvent)

Parameters:udoEvent (CallableObject) –

New in version NX5.0.0.

License requirements: None.

AddUpdateHandler

UserDefinedClass.AddUpdateHandler

Registers the update callback.

Signature AddUpdateHandler(linkEvent)

Parameters:linkEvent (CallableObject) –

New in version NX5.0.0.

License requirements: None.

Dispose

UserDefinedClass.Dispose

Frees the memory associated with this object.

After invocation of this method, the object is no longer valid.

Signature Dispose()

New in version NX5.0.0.

License requirements: None.

GetIsOccurrenceableFlag

UserDefinedClass.GetIsOccurrenceableFlag

Gets the is occurrenceable flag for this class.

Legacy Open C UDO’s required a reference UDO to determine Occurrenceability. Occurrenceability is now set on a class by class basis (no reference UDO required). In the event that you have a legacy UDO you wish to query for occurenceability, you will need set the is occurrenceable flag with the new native language method (which does not require a reference UDO) If you do not set the is occurrenceable flag, and instead use the old open c is occurrenceable callback, you will risk error raising during this method because we will automatically pass None in as the reference UDO to the legacy is occurrenceable callback.

Signature GetIsOccurrenceableFlag()

Returns:Specifies whether or not to populate occurrences for NXOpen.UserDefinedObjects.UserDefinedObject’s of this class.
Return type:bool

New in version NX5.0.0.

License requirements: None.

SetIsOccurrenceableFlag

UserDefinedClass.SetIsOccurrenceableFlag

Sets the is occurrenceable flag for this class.

Signature SetIsOccurrenceableFlag(isOccurrenceable)

Parameters:isOccurrenceable (bool) – Specifies whether or not to populate occurrences for NXOpen.UserDefinedObjects.UserDefinedObject’s of this class.

New in version NX5.0.0.

License requirements: None.