MechatronicsBuilder Class

class NXOpen.Motion.MechatronicsBuilder

Bases: NXOpen.Builder

Represents a Motion.Mechatronics builder

To 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
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 @return
GetInput Retrieves an input port association from its name @return
GetObject Returns the object currently being edited by this builder.
GetOutput Retrieves an output port association from its name @return
GetParameterGroupNames Allows retrieving the list of names of available configuration parameter groups @return
GetPortVariable Searches for the watch variable by name in the active group @return
GetPortVariableGroupNames Allows retrieving the list of names of available port variables groups @return
NewInputListItem Creates a new input list item including expressions @return
NewOutputListItem Creates a new output list item including expressions @return
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 ActiveParameterGroupName()

Returns:
Return type:str

New in version NX11.0.0.

License requirements: mechanisms (“MECHANISMS”)

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

Setter Method

Signature ActiveParameterGroupName(name)

Parameters: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 ActivePortVariableGroupName()

Returns:
Return type:str

New in version NX11.0.0.

License requirements: mechanisms (“MECHANISMS”)

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

Setter Method

Signature ActivePortVariableGroupName(name)

Parameters:name (str) –

New in version NX11.0.0.

License requirements: mechanisms (“MECHANISMS”)

CommunicationInterval

MechatronicsBuilder.CommunicationInterval

Returns or sets the communication interval

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

Getter Method

Signature CommunicationInterval()

Returns:
Return type:NXOpen.Expression

New in version NX11.0.0.

License requirements: mechanisms (“MECHANISMS”)

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

Setter Method

Signature CommunicationInterval(communicationInterval)

Parameters: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 CommunicationIntervalType()

Returns:
Return type:NXOpen.Motion.MechatronicsBuilderSolverCommunicationIntervalType

New in version NX11.0.0.

License requirements: mechanisms (“MECHANISMS”)

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

Setter Method

Signature CommunicationIntervalType(communicationIntervalType)

Parameters: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 ConfigurationParametersList()

Returns:
Return type:NXOpen.Motion.ConfigurationParameterList

New 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 HeaderFile()

Returns:
Return type:str

New in version NX11.0.0.

License requirements: mechanisms (“MECHANISMS”)

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

Setter Method

Signature HeaderFile(filename)

Parameters:filename (str) –

New in version NX11.0.0.

License requirements: mechanisms (“MECHANISMS”)

InputPortsList

MechatronicsBuilder.InputPortsList

Returns the input ports list

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

Getter Method

Signature InputPortsList()

Returns:
Return type:NXOpen.Motion.InputPortAssociationList

New 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 IntegrationType()

Returns:
Return type:NXOpen.Motion.MechatronicsBuilderSolverIntegrationType

New in version NX11.0.0.

License requirements: mechanisms (“MECHANISMS”)

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

Setter Method

Signature IntegrationType(integrationType)

Parameters: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 MechatronicsType()

Returns:
Return type:NXOpen.Motion.MechatronicsBuilderMechatronicsModelType

New in version NX11.0.0.

License requirements: mechanisms (“MECHANISMS”)

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

Setter Method

Signature MechatronicsType(mechatronicsType)

Parameters: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 ModelFile()

Returns:
Return type:str

New in version NX11.0.0.

License requirements: mechanisms (“MECHANISMS”)

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

Setter Method

Signature ModelFile(filename)

Parameters: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 Name()

Returns:
Return type:str

New in version NX11.0.0.

License requirements: mechanisms (“MECHANISMS”)

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

Setter Method

Signature Name(name)

Parameters:name (str) –

New in version NX11.0.0.

License requirements: mechanisms (“MECHANISMS”)

OutputPortsList

MechatronicsBuilder.OutputPortsList

Returns the output ports list

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

Getter Method

Signature OutputPortsList()

Returns:
Return type:NXOpen.Motion.OutputPortAssociationList

New in version NX11.0.0.

License requirements: mechanisms (“MECHANISMS”)

PortVariablesList

MechatronicsBuilder.PortVariablesList

Returns the watch variables list

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

Getter Method

Signature PortVariablesList()

Returns:
Return type:NXOpen.Motion.PortVariableList

New 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 Purpose()

Returns:
Return type:NXOpen.Motion.MechatronicsBuilderPurposeType

New in version NX11.0.0.

License requirements: mechanisms (“MECHANISMS”)

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

Setter Method

Signature Purpose(purpose)

Parameters: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.ConfigurationParameter

New 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.InputPortAssociation

New 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.OutputPortAssociation

New 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.PortVariable

New 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.InputPortAssociation

New 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.OutputPortAssociation

New 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.