MotionSession Class¶
-
class
NXOpen.Motion.
MotionSession
¶ Bases:
object
Represents motion session
To obtain an instance of this class, refer to
NXOpen.Session
New in version NX5.0.0.
“Environments”, ” Returns the <ja_class>NXOpen.Motion.MotionEnvironment </ja_class> belonging to this part ” “PostProcess”, ” Returns the <ja_class>NXOpen.Motion.PostProcess </ja_class> belonging to this part ” “MotionMethods”, ” Returns the <ja_class>NXOpen.Motion.MotionMethods </ja_class>belonging to this part “
Methods¶
Method | Description |
---|---|
CloneSimulation | Clone the Simulation. |
ConstraintsToMotionObject | Convert mating conditions and constraints to links and joints @return the link which will be fixed to ground |
CreateNamingSimulation | Create the Simulation with an input name. |
CreatePhysicsConversionBuilder | Creates a NXOpen.Motion.PhysicsConversionBuilder @return |
CreateSimulation | Create the Simulation. |
DeleteSimulation | Delete the Simulation. |
DirectOpenSimulation | Direct open the Simulation. |
ExportProcessSimulateKinematics | Export kinematics for Process Simulate |
FixLinkToGround | Fix the link to ground @return the joint object created |
GetFullName | Get the full name for a scenario name @return full path to the file |
GetFunctionReferencedMotionObjects | Gets function referenced motion objects. |
GetFunctionReferencingMotionObjects | Gets function referencing motion objects. |
GetReferencedFunctions | Gets the referenced functions @return The referenced functions |
GetReferencedMotionObjects | Gets the referenced motion objects. |
GetReferencingFunctions | Gets the referencing functions @return The referencing functions |
GetReferencingMotionObjects | Gets the referencing motion objects. |
GetScenarioNames | Get all scenario names @return scenario names |
InitializeMechanisms | Initialize the mech |
ReparentSimulation | Reparent the Simulation. |
Environments¶
-
MotionSession.
Environments
¶ Returns the
NXOpen.Motion.MotionEnvironment
belonging to this partSignature
Environments()
New in version NX7.5.0.
Returns: Return type: NXOpen.Motion.MotionEnvironment
PostProcess¶
-
MotionSession.
PostProcess
¶ Returns the
NXOpen.Motion.PostProcess
belonging to this partSignature
PostProcess()
New in version NX7.5.0.
Returns: Return type: NXOpen.Motion.PostProcess
MotionMethods¶
-
MotionSession.
MotionMethods
¶ Returns the :py:class:`NXOpen.Motion.MotionMethods`belonging to this part
Signature
MotionMethods()
New in version NX8.0.0.
Returns: Return type: NXOpen.Motion.MotionMethods
Method Detail¶
CloneSimulation¶
-
MotionSession.
CloneSimulation
¶ Clone the Simulation.
Signature
CloneSimulation(masterPart, motionSimName)
Parameters: - masterPart (
NXOpen.NXObject
) – the master part - motionSimName (str) – motion simulation part which ready to be cloned
Returns: new motion simulation part name
Return type: str
New in version NX5.0.0.
License requirements: mechanisms (“MECHANISMS”)
- masterPart (
ConstraintsToMotionObject¶
-
MotionSession.
ConstraintsToMotionObject
¶ Convert mating conditions and constraints to links and joints
Signature
ConstraintsToMotionObject(scenarioPart, masterPart)
Parameters: - scenarioPart (
NXOpen.NXObject
) – the scenario part object - masterPart (
NXOpen.NXObject
) – the master part object
Returns: the link which will be fixed to ground
Return type: New in version NX6.0.1.
License requirements: mechanisms (“MECHANISMS”)
- scenarioPart (
CreateNamingSimulation¶
-
MotionSession.
CreateNamingSimulation
¶ Create the Simulation with an input name.
Signature
CreateNamingSimulation(masterPart, inputSimName)
Parameters: - masterPart (
NXOpen.NXObject
) – the master_part - inputSimName (str) – the input simulation name
Returns: the created motion simulation part name
Return type: str
New in version NX8.0.0.
License requirements: mechanisms (“MECHANISMS”)
- masterPart (
CreatePhysicsConversionBuilder¶
-
MotionSession.
CreatePhysicsConversionBuilder
¶ Creates a
NXOpen.Motion.PhysicsConversionBuilder
Signature
CreatePhysicsConversionBuilder(scenarioPart)
Parameters: scenarioPart ( NXOpen.NXObject
) –Returns: Return type: NXOpen.Motion.PhysicsConversionBuilder
New in version NX8.0.0.
License requirements: mechanisms (“MECHANISMS”)
CreateSimulation¶
-
MotionSession.
CreateSimulation
¶ Create the Simulation.
Signature
CreateSimulation(masterPart)
Parameters: masterPart ( NXOpen.NXObject
) – the master_partReturns: created motion simulation part name Return type: str New in version NX5.0.0.
License requirements: mechanisms (“MECHANISMS”)
DeleteSimulation¶
-
MotionSession.
DeleteSimulation
¶ Delete the Simulation.
Signature
DeleteSimulation(masterPart, motionSimName)
Parameters: - masterPart (
NXOpen.NXObject
) – the master_part - motionSimName (str) – motion simulation part which ready to be deleted
New in version NX5.0.0.
License requirements: mechanisms (“MECHANISMS”)
- masterPart (
DirectOpenSimulation¶
-
MotionSession.
DirectOpenSimulation
¶ Direct open the Simulation.
Signature
DirectOpenSimulation(motionSimName)
Parameters: motionSimName (str) – motion simulation part name New in version NX5.0.0.
License requirements: mechanisms (“MECHANISMS”)
ExportProcessSimulateKinematics¶
-
MotionSession.
ExportProcessSimulateKinematics
¶ Export kinematics for Process Simulate
Signature
ExportProcessSimulateKinematics()
New in version NX8.5.0.
License requirements: mechanisms (“MECHANISMS”)
FixLinkToGround¶
-
MotionSession.
FixLinkToGround
¶ Fix the link to ground
Signature
FixLinkToGround(link)
Parameters: link ( NXOpen.NXObject
) – the link objectReturns: the joint object created Return type: NXOpen.NXObject
New in version NX6.0.1.
License requirements: mechanisms (“MECHANISMS”)
GetFullName¶
-
MotionSession.
GetFullName
¶ Get the full name for a scenario name
Signature
GetFullName(masterPart, scenarioName)
Parameters: - masterPart (
NXOpen.NXObject
) – the master part object - scenarioName (str) – scenario name to check (with or without extension)
Returns: full path to the file
Return type: str
New in version NX7.0.0.
License requirements: mechanisms (“MECHANISMS”)
- masterPart (
GetFunctionReferencedMotionObjects¶
-
MotionSession.
GetFunctionReferencedMotionObjects
¶ Gets function referenced motion objects.
Signature
GetFunctionReferencedMotionObjects(scenarioPart, funcObject)
Parameters: - scenarioPart (
NXOpen.NXObject
) – - funcObject (
NXOpen.Motion.MotionFunction
) –
Returns: The referenced motion objects
Return type: list of
NXOpen.NXObject
New in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
- scenarioPart (
GetFunctionReferencingMotionObjects¶
-
MotionSession.
GetFunctionReferencingMotionObjects
¶ Gets function referencing motion objects.
Signature
GetFunctionReferencingMotionObjects(scenarioPart, funcObject)
Parameters: - scenarioPart (
NXOpen.NXObject
) – - funcObject (
NXOpen.Motion.MotionFunction
) –
Returns: The referencing motion objects
Return type: list of
NXOpen.NXObject
New in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
- scenarioPart (
GetReferencedFunctions¶
-
MotionSession.
GetReferencedFunctions
¶ Gets the referenced functions
Signature
GetReferencedFunctions(scenarioPart, originObject)
Parameters: - scenarioPart (
NXOpen.NXObject
) – - originObject (
NXOpen.NXObject
) – Non-function motion object.
Returns: The referenced functions
Return type: list of
NXOpen.Motion.MotionFunction
New in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
- scenarioPart (
GetReferencedMotionObjects¶
-
MotionSession.
GetReferencedMotionObjects
¶ Gets the referenced motion objects.
Signature
GetReferencedMotionObjects(scenarioPart, originObject)
Parameters: - scenarioPart (
NXOpen.NXObject
) – - originObject (
NXOpen.NXObject
) – Non-function motion object. For function, please useMotion.MotionSession.GetReferencedMotionObjects()
.
Returns: The referenced motion objects
Return type: list of
NXOpen.NXObject
New in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
- scenarioPart (
GetReferencingFunctions¶
-
MotionSession.
GetReferencingFunctions
¶ Gets the referencing functions
Signature
GetReferencingFunctions(scenarioPart, originObject)
Parameters: - scenarioPart (
NXOpen.NXObject
) – - originObject (
NXOpen.NXObject
) – Non-function motion object.
Returns: The referencing functions
Return type: list of
NXOpen.Motion.MotionFunction
New in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
- scenarioPart (
GetReferencingMotionObjects¶
-
MotionSession.
GetReferencingMotionObjects
¶ Gets the referencing motion objects.
Signature
GetReferencingMotionObjects(scenarioPart, originObject)
Parameters: - scenarioPart (
NXOpen.NXObject
) – - originObject (
NXOpen.NXObject
) – Non-function motion object. For function, please useMotion.MotionSession.GetReferencingMotionObjects()
.
Returns: The referencing motion objects.
Return type: list of
NXOpen.NXObject
New in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
- scenarioPart (
GetScenarioNames¶
-
MotionSession.
GetScenarioNames
¶ Get all scenario names
Signature
GetScenarioNames(masterPart)
Parameters: masterPart ( NXOpen.NXObject
) – the master part objectReturns: scenario names Return type: list of str New in version NX7.0.0.
License requirements: mechanisms (“MECHANISMS”)
InitializeMechanisms¶
-
MotionSession.
InitializeMechanisms
¶ Initialize the mech
Signature
InitializeMechanisms()
New in version NX6.0.0.
License requirements: mechanisms (“MECHANISMS”)
ReparentSimulation¶
-
MotionSession.
ReparentSimulation
¶ Reparent the Simulation.
Signature
ReparentSimulation(motionSimFullName, destinationDirectory)
Parameters: - motionSimFullName (str) – motion simulation full name
- destinationDirectory (str) – destination directory
New in version NX5.0.0.
License requirements: mechanisms (“MECHANISMS”)