CommandManager Class — NXOpen Python API Reference 12.0.0 documentation

# CommandManager Class

class `NXOpen.Report.``CommandManager`

  Bases: `object`

  Represents the command manager.

  Not support KF.

  New in version NX11.0.0.

# Methods

Method | Description
--- | ---
CreateCommandBuilder | Creates the command builder.
ExportCommandsToLibraryFile | Export selected commands to a library folder zip file.
Find | Finds the `TaggedObject` with the given identifier as recorded in a journal.
GetCommandLibraries | Gets all command libraries.
NewCommandImporter | Creates a transient object `NXOpen.Report.CommandImporter` to import the selected commands of a command library file to a command library.

# Method Detail

## CreateCommandBuilder

`CommandManager.``CreateCommandBuilder`

  Creates the command builder.

  Signature `CreateCommandBuilder(commandLibrary, command)`

  Parameters:

  - commandLibrary (`NXOpen.Report.CommandLibrary`) –
  - command (`NXOpen.Report.Command`) –

  Returns: |
  Return type: | `NXOpen.Report.CommandBuilder`

  New in version NX11.0.0.

  License requirements: None.

## ExportCommandsToLibraryFile

`CommandManager.``ExportCommandsToLibraryFile`

  Export selected commands to a library folder zip file.

  Signature `ExportCommandsToLibraryFile(pCommands, libraryFile)`

  Parameters:

  - pCommands (list of `NXOpen.Report.Command`) –
  - libraryFile (str) – Library folder zip file name with full path

  New in version NX11.0.0.

  License requirements: None.

## Find

`CommandManager.``Find`

  Finds the `TaggedObject` with the given identifier as recorded in a journal.

  Signature `Find(journalIdentifier)`

  Parameters: | journalIdentifier (str) – Identifier of the `TaggedObject` to be found
  Returns: | Object found, or null if no such object exists
  Return type: | `NXOpen.TaggedObject`

  New in version NX11.0.0.

  License requirements: None.

## GetCommandLibraries

`CommandManager.``GetCommandLibraries`

  Gets all command libraries.

  Signature `GetCommandLibraries()`

  Returns: |
  Return type: | list of `NXOpen.Report.CommandLibrary`

  New in version NX11.0.0.

  License requirements: None.

## NewCommandImporter

`CommandManager.``NewCommandImporter`

  Creates a transient object `NXOpen.Report.CommandImporter` to import the selected commands of a command library file to a command library.

  The object should be destroyed after finishing import.

  Signature `NewCommandImporter(pCommandLibrary, libraryFile)`

  Parameters:

  - pCommandLibrary (`NXOpen.Report.CommandLibrary`) –
  - libraryFile (str) – Library folder zip file name with full path

  Returns: |
  Return type: | `NXOpen.Report.CommandImporter`

  New in version NX11.0.0.

  License requirements: None.