UserDefinedObjectManager Class — NXOpen Python API Reference 12.0.0 documentation

# UserDefinedObjectManager Class

class `NXOpen.UserDefinedObjects.``UserDefinedObjectManager`

  Bases: `object`

  This class creates and manages UserDefinedObjects

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

  New in version NX5.0.0.

# Methods

Method | Description
--- | ---
CreateUserDefinedObject | Constructs a new `NXOpen.Features.UserDefinedObjectFeature`.
GetLinksToObject | Queries an NX Object to find all `UserDefinedObjects.UserDefinedObject`’s that are linked to the given NXObject (note this will not find owning udos)
GetOwningUserDefinedObject | Queries an NX Object to find the `UserDefinedObjects.UserDefinedObject` that owns the given NXObject (note this will return null for the owning udo if the object is not owned)
GetUdosOfClass | Finds all `UserDefinedObjects.UserDefinedObject` instances that use the given `NXOpen.UserDefinedObjects.UserDefinedClass`.
IsObjectLinkable | Queries an NX Object to see if it can be linked to a `UserDefinedObjects.UserDefinedObject` via the given link type
IsObjectLinkedToUserDefinedObject | Queries an NX Object to see if it is linked to a `UserDefinedObjects.UserDefinedObject` (note this will not tell you if the object is owned by a UDO with an owning link)
IsObjectOwnedByUserDefinedObject | Queries an NX Object to see if it is owned by a `UserDefinedObjects.UserDefinedObject`

# Structs

UserDefinedObjectManagerLinkedUdoDefinition_Struct Struct | Used to define a link to a UserDefinedObject

# Method Detail

## CreateUserDefinedObject

`UserDefinedObjectManager.``CreateUserDefinedObject`

  Constructs a new `NXOpen.Features.UserDefinedObjectFeature`.

  Signature `CreateUserDefinedObject(udoClass)`

  Parameters: | udoClass (`NXOpen.UserDefinedObjects.UserDefinedClass`) – The UserDefinedClass used to define the new UserDefinedObject
  Returns: | The new UserDefinedObject instance
  Return type: | `NXOpen.UserDefinedObjects.UserDefinedObject`

  New in version NX5.0.0.

  License requirements: None.

## GetLinksToObject

`UserDefinedObjectManager.``GetLinksToObject`

  Queries an NX Object to find all `UserDefinedObjects.UserDefinedObject`’s that are linked to the given NXObject (note this will not find owning udos)

  Signature `GetLinksToObject(linkObject)`

  Parameters: | linkObject (`NXOpen.TaggedObject`) – NXObject to query for links
  Returns: | The link definitions from UDO’s to the NXObject
  Return type: | list of `NXOpen.UserDefinedObjects.UserDefinedObjectManagerLinkedUdoDefinition_Struct`

  New in version NX5.0.0.

  License requirements: None.

## GetOwningUserDefinedObject

`UserDefinedObjectManager.``GetOwningUserDefinedObject`

  Queries an NX Object to find the `UserDefinedObjects.UserDefinedObject` that owns the given NXObject (note this will return null for the owning udo if the object is not owned)

  Signature `GetOwningUserDefinedObject(linkObject)`

  Parameters: | linkObject (`NXOpen.TaggedObject`) – NXObject to query for an owning UDO
  Returns: | The UDO which owns the NXObject
  Return type: | `NXOpen.UserDefinedObjects.UserDefinedObject`

  New in version NX5.0.0.

  License requirements: None.

## GetUdosOfClass

`UserDefinedObjectManager.``GetUdosOfClass`

  Finds all `UserDefinedObjects.UserDefinedObject` instances that use the given `NXOpen.UserDefinedObjects.UserDefinedClass`.

  Signature `GetUdosOfClass(udoClass)`

  Parameters: | udoClass (`NXOpen.UserDefinedObjects.UserDefinedClass`) – The UserDefinedClass we want to find
  Returns: | User Defined Objects of the given class
  Return type: | list of `NXOpen.UserDefinedObjects.UserDefinedObject`

  New in version NX5.0.0.

  License requirements: None.

## IsObjectLinkable

`UserDefinedObjectManager.``IsObjectLinkable`

  Queries an NX Object to see if it can be linked to a `UserDefinedObjects.UserDefinedObject` via the given link type

  Signature `IsObjectLinkable(linkObject, linkType)`

  Parameters:

  - linkObject (`NXOpen.TaggedObject`) – NXObject to query for linkability
  - linkType (`NXOpen.UserDefinedObjects.UserDefinedObjectLinkType`) – The link type used to link this object to a UDO

  Returns: | TRUE - This object can be linked to a UDO with the given link type, FALSE - this object can not be NOT linked to a UDO with the given link type
  Return type: | bool

  New in version NX5.0.0.

  License requirements: None.

## IsObjectLinkedToUserDefinedObject

`UserDefinedObjectManager.``IsObjectLinkedToUserDefinedObject`

  Queries an NX Object to see if it is linked to a `UserDefinedObjects.UserDefinedObject` (note this will not tell you if the object is owned by a UDO with an owning link)

  Signature `IsObjectLinkedToUserDefinedObject(linkObject)`

  Parameters: | linkObject (`NXOpen.TaggedObject`) – NXObject to query for links
  Returns: | TRUE - This object is linked to a UDO, FALSE - this object is NOT linked to a UDO
  Return type: | bool

  New in version NX5.0.0.

  License requirements: None.

## IsObjectOwnedByUserDefinedObject

`UserDefinedObjectManager.``IsObjectOwnedByUserDefinedObject`

  Queries an NX Object to see if it is owned by a `UserDefinedObjects.UserDefinedObject`

  Signature `IsObjectOwnedByUserDefinedObject(linkObject)`

  Parameters: | linkObject (`NXOpen.TaggedObject`) – NXObject to query for an owning UDO
  Returns: | TRUE - This object is owned by a UDO, FALSE - this object is NOT owned by a UDO
  Return type: | bool

  New in version NX5.0.0.

  License requirements: None.