CommandBuilder Class¶
-
class
NXOpen.Report.
CommandBuilder
¶ Bases:
NXOpen.Builder
Represents a
NXOpen.Report.CommandBuilder
.To create a new instance of this class, use
NXOpen.Report.CommandManager.CreateCommandBuilder()
New in version NX11.0.0.
Properties¶
Property | Description |
---|---|
Active |
|
DisplayName | Returns or sets the command display name |
Name | Returns or sets the command name |
ProgramInformation | Returns the automation program information object. |
Tag | Returns the Tag for this object. |
Methods¶
Method | Description |
---|---|
AddArgument | Adds an argument and adds it to the command. |
AddUserInput | Adds an user input and adds it to command. |
Commit | Commits any edits that have been applied to the builder. |
Destroy | Deletes the builder, and cleans up any objects created by the builder. |
GetArguments | Gets all arguments in the command. |
GetCommittedObjects | For builders that create more than one object, this method returns the objects that are created by commit. |
GetHint | Gets the command hint |
GetNamespaces | Gets the categories which command apply to. |
GetObject | Returns the object currently being edited by this builder. |
GetUserInputs | Gets all user inputs. |
MoveUserInputs | Moves the user inputs to the new position. |
RemoveArguments | Removes the arguments. |
RemoveUserInputs | Removes the user inputs. |
SetHint | Sets the command hint |
SetNamespaces | Sets the categories which command apply to. |
ShowResults | Updates the model to reflect the result of an edit to the model for all builders that support showing results. |
Validate | Validate whether the inputs to the component are sufficient for commit to be called. |
Enumerations¶
CommandBuilderUserInputLocation Enumeration | Represents the user input location in command. |
Property Detail¶
Active¶
-
CommandBuilder.
Active
¶ Returns or sets a value that indicates whether the command is active or not.
-------------------------------------
Getter Method
Signature
Active()
Returns: Return type: bool New in version NX11.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
Active(isActive)
Parameters: isActive (bool) – New in version NX11.0.0.
License requirements: None.
DisplayName¶
-
CommandBuilder.
DisplayName
¶ Returns or sets the command display name
-------------------------------------
Getter Method
Signature
DisplayName()
Returns: Return type: str New in version NX11.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
DisplayName(displayName)
Parameters: displayName (str) – New in version NX11.0.0.
License requirements: None.
Name¶
-
CommandBuilder.
Name
¶ Returns or sets the command name
-------------------------------------
Getter Method
Signature
Name()
Returns: Return type: str New in version NX11.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
Name(commandName)
Parameters: commandName (str) – New in version NX11.0.0.
License requirements: None.
ProgramInformation¶
-
CommandBuilder.
ProgramInformation
¶ Returns the automation program information object.
-------------------------------------
Getter Method
Signature
ProgramInformation()
Returns: Return type: NXOpen.Report.ProgramInformation
New in version NX11.0.0.
License requirements: None.
Method Detail¶
AddArgument¶
-
CommandBuilder.
AddArgument
¶ Adds an argument and adds it to the command.
Signature
AddArgument(argumentType)
Parameters: argumentType ( NXOpen.Report.BaseArgumentType
) –Returns: Return type: NXOpen.Report.BaseArgument
New in version NX11.0.0.
License requirements: None.
AddUserInput¶
-
CommandBuilder.
AddUserInput
¶ Adds an user input and adds it to command.
Signature
AddUserInput(userInputLocation, userInputType)
Parameters: - userInputLocation (
NXOpen.Report.CommandBuilderUserInputLocation
) – - userInputType (
NXOpen.Report.UserInputType
) –
Returns: Return type: New in version NX11.0.0.
License requirements: None.
- userInputLocation (
GetArguments¶
-
CommandBuilder.
GetArguments
¶ Gets all arguments in the command.
Signature
GetArguments()
Returns: Return type: list of NXOpen.Report.BaseArgument
New in version NX11.0.0.
License requirements: None.
GetHint¶
-
CommandBuilder.
GetHint
¶ Gets the command hint
Signature
GetHint()
Returns: Return type: list of str New in version NX11.0.0.
License requirements: None.
GetNamespaces¶
-
CommandBuilder.
GetNamespaces
¶ Gets the categories which command apply to.
Signature
GetNamespaces()
Returns: Return type: list of str New in version NX11.0.0.
License requirements: None.
GetUserInputs¶
-
CommandBuilder.
GetUserInputs
¶ Gets all user inputs.
Signature
GetUserInputs(userInputLocation)
Parameters: userInputLocation ( NXOpen.Report.CommandBuilderUserInputLocation
) –Returns: Return type: list of NXOpen.Report.UserInput
New in version NX11.0.0.
License requirements: None.
MoveUserInputs¶
-
CommandBuilder.
MoveUserInputs
¶ Moves the user inputs to the new position.
Signature
MoveUserInputs(userInputLocation, pUserInputs, isBeforeRefUserInput, pRefUserInputs)
Parameters: - userInputLocation (
NXOpen.Report.CommandBuilderUserInputLocation
) – - pUserInputs (list of
NXOpen.Report.UserInput
) – - isBeforeRefUserInput (bool) –
- pRefUserInputs (
NXOpen.Report.UserInput
) – the target reference user input
New in version NX11.0.0.
License requirements: None.
- userInputLocation (
RemoveArguments¶
-
CommandBuilder.
RemoveArguments
¶ Removes the arguments.
Signature
RemoveArguments(pArguments)
Parameters: pArguments (list of NXOpen.Report.BaseArgument
) –New in version NX11.0.0.
License requirements: None.
RemoveUserInputs¶
-
CommandBuilder.
RemoveUserInputs
¶ Removes the user inputs.
Signature
RemoveUserInputs(userInputLocation, pUserInputs)
Parameters: - userInputLocation (
NXOpen.Report.CommandBuilderUserInputLocation
) – - pUserInputs (list of
NXOpen.Report.UserInput
) –
New in version NX11.0.0.
License requirements: None.
- userInputLocation (
SetHint¶
-
CommandBuilder.
SetHint
¶ Sets the command hint
Signature
SetHint(commandHint)
Parameters: commandHint (list of str) – New in version NX11.0.0.
License requirements: None.
SetNamespaces¶
-
CommandBuilder.
SetNamespaces
¶ Sets the categories which command apply to.
Signature
SetNamespaces(pNamespaces)
Parameters: pNamespaces (list of str) – New in version NX11.0.0.
License requirements: None.
Validate¶
-
CommandBuilder.
Validate
¶ Validate whether the inputs to the component are sufficient for commit to be called.
If the component is not in a state to commit then an exception is thrown. For example, if the component requires you to set some property, this method will throw an exception if you haven’t set it. This method throws a not-yet-implemented NXException for some components.
Signature
Validate()
Returns: Was self validation successful Return type: bool New in version NX3.0.1.
License requirements: None.