MechatronicsBuilder Class¶
-
class
NXOpen.Motion.MechatronicsBuilder¶ Bases:
NXOpen.Motion.MotionBuilderRepresents a
Motion.MechatronicsbuilderTo create a new instance of this class, use
NXOpen.Motion.MechatronicsCollection.CreateMechatronicsBuilder()Default values.
Property Value CommunicationInterval.Value 0.01 (millimeters part), 0.01 (inches part) CommunicationIntervalType Constant IntegrationType CoSimulation MechatronicsType Amesim Purpose Import New in version NX11.0.0.
Properties¶
| Property | Description |
|---|---|
| ActiveParameterGroupName | Returns or sets the active configuration parameters group name |
| ActivePortVariableGroupName | Returns or sets the active port variable group name |
| CommunicationInterval | Returns or sets the communication interval |
| CommunicationIntervalType | Returns or sets the communication interval type - possible values are Constant, Variable |
| ConfigurationParametersList | Returns the configuration/watch parameters list |
| DisplayScale | Returns or sets the icon display scale |
| GroupName | Returns or sets the group name |
| GroupType | Returns or sets the group type |
| HeaderFile | Returns or sets the header file - matlab speciffic header file, that contains the definition of the interface (inputs, outputs) |
| InputPortsList | Returns the input ports list |
| IntegrationType | Returns or sets the integration type - possible values are CoSimulation, ModelExchange |
| MechatronicsType | Returns or sets the mechatronics type - possible values are Matlab or Amesim |
| ModelFile | Returns or sets the model file - a file path to a MATLAB generated DLL or to an Amesim ame file |
| Name | Returns or sets the name of the element |
| OutputPortsList | Returns the output ports list |
| PortVariablesList | Returns the watch variables list |
| Purpose | Returns or sets the purpose of the mechatronics element - possible values are Import, Export |
| Tag | Returns the Tag for this object. |
Methods¶
| Method | Description |
|---|---|
| Commit | Commits any edits that have been applied to the builder. |
| Destroy | Deletes the builder, and cleans up any objects created by the builder. |
| GetCommittedObjects | For builders that create more than one object, this method returns the objects that are created by commit. |
| GetConfigurationParameter | Searches for the watch parameter by name in the active group |
| GetInput | Retrieves an input port association from its name |
| GetObject | Returns the object currently being edited by this builder. |
| GetOutput | Retrieves an output port association from its name |
| GetParameterGroupNames | Allows retrieving the list of names of available configuration parameter groups |
| GetPortVariable | Searches for the watch variable by name in the active group |
| GetPortVariableGroupNames | Allows retrieving the list of names of available port variables groups |
| NewInputListItem | Creates a new input list item including expressions |
| NewOutputListItem | Creates a new output list item including expressions |
| ReadInterfaceFromFile | Reads the input/output definition of a mechatronics element from an external file, when purpose is specified as Export. |
| RefreshLists | Updates the list of available inputs and outputs (for both MATLAB ans Amesim models) and Configuration Parametersa and port Variables (for Amesim only) from the selected HeaderFile/ModelFile |
| 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¶
| MechatronicsBuilderMechatronicsModelType Enumeration | the mechatronics type - possible values are Matlab or Amesim |
| MechatronicsBuilderPurposeType Enumeration | the mechatronics purpose type - possible values are Import and Export |
| MechatronicsBuilderSolverCommunicationIntervalType Enumeration | the mechatronics communication interval type - only for Amesim! - possible values are Constant and Variable |
| MechatronicsBuilderSolverIntegrationType Enumeration | the mechatronics integration type - possible values are ModelExchange and CoSimulation |
Property Detail¶
ActiveParameterGroupName¶
-
MechatronicsBuilder.ActiveParameterGroupName¶ Returns or sets the active configuration parameters group name
-------------------------------------Getter Method
Signature
ActiveParameterGroupNameReturns: Return type: str New in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
-------------------------------------Setter Method
Signature
ActiveParameterGroupNameParameters: name (str) – New in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
ActivePortVariableGroupName¶
-
MechatronicsBuilder.ActivePortVariableGroupName¶ Returns or sets the active port variable group name
-------------------------------------Getter Method
Signature
ActivePortVariableGroupNameReturns: Return type: str New in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
-------------------------------------Setter Method
Signature
ActivePortVariableGroupNameParameters: name (str) – New in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
CommunicationInterval¶
-
MechatronicsBuilder.CommunicationInterval¶ Returns or sets the communication interval
-------------------------------------Getter Method
Signature
CommunicationIntervalReturns: Return type: NXOpen.ExpressionNew in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
-------------------------------------Setter Method
Signature
CommunicationIntervalParameters: communicationInterval ( NXOpen.Expression) –New in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
CommunicationIntervalType¶
-
MechatronicsBuilder.CommunicationIntervalType¶ Returns or sets the communication interval type - possible values are Constant, Variable
-------------------------------------Getter Method
Signature
CommunicationIntervalTypeReturns: Return type: NXOpen.Motion.MechatronicsBuilderSolverCommunicationIntervalTypeNew in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
-------------------------------------Setter Method
Signature
CommunicationIntervalTypeParameters: communicationIntervalType ( NXOpen.Motion.MechatronicsBuilderSolverCommunicationIntervalType) –New in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
ConfigurationParametersList¶
-
MechatronicsBuilder.ConfigurationParametersList¶ Returns the configuration/watch parameters list
-------------------------------------Getter Method
Signature
ConfigurationParametersListReturns: Return type: NXOpen.Motion.ConfigurationParameterListNew in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
HeaderFile¶
-
MechatronicsBuilder.HeaderFile¶ Returns or sets the header file - matlab speciffic header file, that contains the definition of the interface (inputs, outputs)
-------------------------------------Getter Method
Signature
HeaderFileReturns: Return type: str New in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
-------------------------------------Setter Method
Signature
HeaderFileParameters: filename (str) – New in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
InputPortsList¶
-
MechatronicsBuilder.InputPortsList¶ Returns the input ports list
-------------------------------------Getter Method
Signature
InputPortsListReturns: Return type: NXOpen.Motion.InputPortAssociationListNew in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
IntegrationType¶
-
MechatronicsBuilder.IntegrationType¶ Returns or sets the integration type - possible values are CoSimulation, ModelExchange
-------------------------------------Getter Method
Signature
IntegrationTypeReturns: Return type: NXOpen.Motion.MechatronicsBuilderSolverIntegrationTypeNew in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
-------------------------------------Setter Method
Signature
IntegrationTypeParameters: integrationType ( NXOpen.Motion.MechatronicsBuilderSolverIntegrationType) –New in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
MechatronicsType¶
-
MechatronicsBuilder.MechatronicsType¶ Returns or sets the mechatronics type - possible values are Matlab or Amesim
-------------------------------------Getter Method
Signature
MechatronicsTypeReturns: Return type: NXOpen.Motion.MechatronicsBuilderMechatronicsModelTypeNew in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
-------------------------------------Setter Method
Signature
MechatronicsTypeParameters: mechatronicsType ( NXOpen.Motion.MechatronicsBuilderMechatronicsModelType) –New in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
ModelFile¶
-
MechatronicsBuilder.ModelFile¶ Returns or sets the model file - a file path to a MATLAB generated DLL or to an Amesim ame file
-------------------------------------Getter Method
Signature
ModelFileReturns: Return type: str New in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
-------------------------------------Setter Method
Signature
ModelFileParameters: filename (str) – New in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
Name¶
-
MechatronicsBuilder.Name¶ Returns or sets the name of the element
-------------------------------------Getter Method
Signature
NameReturns: Return type: str New in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
-------------------------------------Setter Method
Signature
NameParameters: name (str) – New in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
OutputPortsList¶
-
MechatronicsBuilder.OutputPortsList¶ Returns the output ports list
-------------------------------------Getter Method
Signature
OutputPortsListReturns: Return type: NXOpen.Motion.OutputPortAssociationListNew in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
PortVariablesList¶
-
MechatronicsBuilder.PortVariablesList¶ Returns the watch variables list
-------------------------------------Getter Method
Signature
PortVariablesListReturns: Return type: NXOpen.Motion.PortVariableListNew in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
Purpose¶
-
MechatronicsBuilder.Purpose¶ Returns or sets the purpose of the mechatronics element - possible values are Import, Export
-------------------------------------Getter Method
Signature
PurposeReturns: Return type: NXOpen.Motion.MechatronicsBuilderPurposeTypeNew in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
-------------------------------------Setter Method
Signature
PurposeParameters: purpose ( NXOpen.Motion.MechatronicsBuilderPurposeType) –New in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
Method Detail¶
GetConfigurationParameter¶
-
MechatronicsBuilder.GetConfigurationParameter¶ Searches for the watch parameter by name in the active group
Signature
GetConfigurationParameter(inputName)Parameters: inputName (str) – Returns: Return type: NXOpen.Motion.ConfigurationParameterNew in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
GetInput¶
-
MechatronicsBuilder.GetInput¶ Retrieves an input port association from its name
Signature
GetInput(inputName)Parameters: inputName (str) – Returns: Return type: NXOpen.Motion.InputPortAssociationNew in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
GetOutput¶
-
MechatronicsBuilder.GetOutput¶ Retrieves an output port association from its name
Signature
GetOutput(inputName)Parameters: inputName (str) – Returns: Return type: NXOpen.Motion.OutputPortAssociationNew in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
GetParameterGroupNames¶
-
MechatronicsBuilder.GetParameterGroupNames¶ Allows retrieving the list of names of available configuration parameter groups
Signature
GetParameterGroupNames()Returns: Return type: list of str New in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
GetPortVariable¶
-
MechatronicsBuilder.GetPortVariable¶ Searches for the watch variable by name in the active group
Signature
GetPortVariable(inputName)Parameters: inputName (str) – Returns: Return type: NXOpen.Motion.PortVariableNew in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
GetPortVariableGroupNames¶
-
MechatronicsBuilder.GetPortVariableGroupNames¶ Allows retrieving the list of names of available port variables groups
Signature
GetPortVariableGroupNames()Returns: Return type: list of str New in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
NewInputListItem¶
-
MechatronicsBuilder.NewInputListItem¶ Creates a new input list item including expressions
Signature
NewInputListItem()Returns: Return type: NXOpen.Motion.InputPortAssociationNew in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
NewOutputListItem¶
-
MechatronicsBuilder.NewOutputListItem¶ Creates a new output list item including expressions
Signature
NewOutputListItem()Returns: Return type: NXOpen.Motion.OutputPortAssociationNew in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
ReadInterfaceFromFile¶
-
MechatronicsBuilder.ReadInterfaceFromFile¶ Reads the input/output definition of a mechatronics element from an external file, when purpose is specified as Export.
Allowed file types are .txt, .csv, and Excel files
Signature
ReadInterfaceFromFile(filePath)Parameters: filePath (str) – New in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
RefreshLists¶
-
MechatronicsBuilder.RefreshLists¶ Updates the list of available inputs and outputs (for both MATLAB ans Amesim models) and Configuration Parametersa and port Variables (for Amesim only) from the selected HeaderFile/ModelFile
Signature
RefreshLists()New in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
Validate¶
-
MechatronicsBuilder.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.