MotionSession Class¶
-
class
NXOpen.Motion.MotionSession¶ Bases:
objectRepresents motion session
To obtain an instance of this class, refer to
NXOpen.SessionNew in version NX5.0.0.
“Environments”, “Returns the
NXOpen.Motion.MotionEnvironmentbelonging to this part ” “PostProcess”, “Returns theNXOpen.Motion.PostProcessbelonging to this part ” “MotionMethods”, “Returns theNXOpen.Motion.MotionMethods`belonging to this part " ":ref:`NXOpen.Motion.MotionSession.MechanismImport”, “Returns theNXOpen.Motion.MechanismImportobject belonging to this part ” “MechanismExport”, “Returns theNXOpen.Motion.MechanismExportobject belonging to this part “
Methods¶
| Method | Description |
|---|---|
| CloneSimulation | Clones the Simulation. |
| ConstraintsToMotionObject | Converts mating conditions and constraints to links and joints |
| CreateNamingSimulation | Creates the Non-master Simulation in NX Manager mode with an input name. |
| CreatePhysicsConversionBuilder | Creates a NXOpen.Motion.PhysicsConversionBuilder |
| CreateSimulation | Creates the Simulation. |
| DeleteSimulation | Deletes the Simulation. |
| DirectOpenSimulation | Opens the Simulation directly. |
| ExportProcessSimulateKinematics | Exports kinematics for Process Simulate |
| FixLinkToGround | Fixes the link to ground |
| GetFullName | Gets the full name for a scenario name, which is located in motion subfolder of master part |
| GetFunctionReferencedMotionObjects | Gets function referenced motion objects. |
| GetFunctionReferencingMotionObjects | Gets function referencing motion objects. |
| GetReferencedFunctions | Gets the referenced functions |
| GetReferencedMotionObjects | Gets the referenced motion objects. |
| GetReferencingFunctions | Gets the referencing functions |
| GetReferencingMotionObjects | Gets the referencing motion objects. |
| GetScenarioNames | Gets all scenario names from motion subfolder of master part |
| InitializeMechanisms | Initializes the mech |
| InitializeSimulation | Initializes the motion simulation context for the loaded motion part |
| ReparentSimulation | Reparents the Simulation. |
Environments¶
-
MotionSession.Environments¶ Returns the
NXOpen.Motion.MotionEnvironmentbelonging to this partSignature
EnvironmentsNew in version NX7.5.0.
Returns: Return type: NXOpen.Motion.MotionEnvironment
PostProcess¶
-
MotionSession.PostProcess¶ Returns the
NXOpen.Motion.PostProcessbelonging to this partSignature
PostProcessNew 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
MotionMethodsNew in version NX8.0.0.
Returns: Return type: NXOpen.Motion.MotionMethods
MechanismImport¶
-
MotionSession.MechanismImport¶ Returns the
NXOpen.Motion.MechanismImportobject belonging to this partSignature
MechanismImportNew in version NX12.0.0.
Returns: Return type: NXOpen.Motion.MechanismImport
MechanismExport¶
-
MotionSession.MechanismExport¶ Returns the
NXOpen.Motion.MechanismExportobject belonging to this partSignature
MechanismExportNew in version NX12.0.0.
Returns: Return type: NXOpen.Motion.MechanismExport
Method Detail¶
CloneSimulation¶
-
MotionSession.CloneSimulation¶ Clones 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¶ Converts 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¶ Creates the Non-master Simulation in NX Manager mode 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.PhysicsConversionBuilderSignature
CreatePhysicsConversionBuilder(scenarioPart)Parameters: scenarioPart ( NXOpen.NXObject) –Returns: Return type: NXOpen.Motion.PhysicsConversionBuilderNew in version NX8.0.0.
License requirements: mechanisms (“MECHANISMS”)
CreateSimulation¶
-
MotionSession.CreateSimulation¶ Creates 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.
Deprecated since version NX12.0.0: Use
NXOpen.FileNewandNXOpen.Motion.MotionSession.InitializeSimulation()License requirements: mechanisms (“MECHANISMS”)
DeleteSimulation¶
-
MotionSession.DeleteSimulation¶ Deletes 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.
Deprecated since version NX12.0.0: Removed without replacement.
License requirements: mechanisms (“MECHANISMS”)
- masterPart (
DirectOpenSimulation¶
-
MotionSession.DirectOpenSimulation¶ Opens the Simulation directly.
Signature
DirectOpenSimulation(motionSimName)Parameters: motionSimName (str) – motion simulation part name New in version NX5.0.0.
Deprecated since version NX12.0.0: Use
NXOpen.PartCollection.OpenDisplay()andNXOpen.Motion.MotionSession.InitializeSimulation()License requirements: mechanisms (“MECHANISMS”)
ExportProcessSimulateKinematics¶
-
MotionSession.ExportProcessSimulateKinematics¶ Exports kinematics for Process Simulate
Signature
ExportProcessSimulateKinematics()New in version NX8.5.0.
License requirements: mechanisms (“MECHANISMS”)
FixLinkToGround¶
-
MotionSession.FixLinkToGround¶ Fixes the link to ground
Signature
FixLinkToGround(link)Parameters: link ( NXOpen.NXObject) – the link objectReturns: the joint object created Return type: NXOpen.NXObjectNew in version NX6.0.1.
License requirements: mechanisms (“MECHANISMS”)
GetFullName¶
-
MotionSession.GetFullName¶ Gets the full name for a scenario name, which is located in motion subfolder of master part
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.NXObjectNew 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.NXObjectNew 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.MotionFunctionNew 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.NXObjectNew 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.MotionFunctionNew 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.NXObjectNew in version NX11.0.0.
License requirements: mechanisms (“MECHANISMS”)
- scenarioPart (
GetScenarioNames¶
-
MotionSession.GetScenarioNames¶ Gets all scenario names from motion subfolder of master part
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¶ Initializes the mech
Signature
InitializeMechanisms()New in version NX6.0.0.
Deprecated since version NX12.0.0: Use
NXOpen.Motion.MotionSession.InitializeSimulation()License requirements: mechanisms (“MECHANISMS”)
InitializeSimulation¶
-
MotionSession.InitializeSimulation¶ Initializes the motion simulation context for the loaded motion part
Signature
InitializeSimulation(simulationPart)Parameters: simulationPart ( NXOpen.Part) – the loaded motion simulation partNew in version NX12.0.0.
License requirements: mechanisms (“MECHANISMS”)
ReparentSimulation¶
-
MotionSession.ReparentSimulation¶ Reparents the Simulation.
Signature
ReparentSimulation(motionSimFullName, destinationDirectory)Parameters: - motionSimFullName (str) – motion simulation full name
- destinationDirectory (str) – destination directory
New in version NX5.0.0.
Deprecated since version NX12.0.0: Removed without replacement.
License requirements: mechanisms (“MECHANISMS”)