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 part

Signature Environments()

New in version NX7.5.0.

Returns:
Return type:NXOpen.Motion.MotionEnvironment

PostProcess

MotionSession.PostProcess

Returns the NXOpen.Motion.PostProcess belonging to this part

Signature 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”)

ConstraintsToMotionObject

MotionSession.ConstraintsToMotionObject

Convert mating conditions and constraints to links and joints

Signature ConstraintsToMotionObject(scenarioPart, masterPart)

Parameters:
Returns:

the link which will be fixed to ground

Return type:

NXOpen.NXObject

New in version NX6.0.1.

License requirements: mechanisms (“MECHANISMS”)

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”)

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_part
Returns: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”)

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 object
Returns: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”)

GetFunctionReferencedMotionObjects

MotionSession.GetFunctionReferencedMotionObjects

Gets function referenced motion objects.

Signature GetFunctionReferencedMotionObjects(scenarioPart, funcObject)

Parameters:
Returns:

The referenced motion objects

Return type:

list of NXOpen.NXObject

New in version NX11.0.0.

License requirements: mechanisms (“MECHANISMS”)

GetFunctionReferencingMotionObjects

MotionSession.GetFunctionReferencingMotionObjects

Gets function referencing motion objects.

Signature GetFunctionReferencingMotionObjects(scenarioPart, funcObject)

Parameters:
Returns:

The referencing motion objects

Return type:

list of NXOpen.NXObject

New in version NX11.0.0.

License requirements: mechanisms (“MECHANISMS”)

GetReferencedFunctions

MotionSession.GetReferencedFunctions

Gets the referenced functions

Signature GetReferencedFunctions(scenarioPart, originObject)

Parameters:
Returns:

The referenced functions

Return type:

list of NXOpen.Motion.MotionFunction

New in version NX11.0.0.

License requirements: mechanisms (“MECHANISMS”)

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 use Motion.MotionSession.GetReferencedMotionObjects().
Returns:

The referenced motion objects

Return type:

list of NXOpen.NXObject

New in version NX11.0.0.

License requirements: mechanisms (“MECHANISMS”)

GetReferencingFunctions

MotionSession.GetReferencingFunctions

Gets the referencing functions

Signature GetReferencingFunctions(scenarioPart, originObject)

Parameters:
Returns:

The referencing functions

Return type:

list of NXOpen.Motion.MotionFunction

New in version NX11.0.0.

License requirements: mechanisms (“MECHANISMS”)

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 use Motion.MotionSession.GetReferencingMotionObjects().
Returns:

The referencing motion objects.

Return type:

list of NXOpen.NXObject

New in version NX11.0.0.

License requirements: mechanisms (“MECHANISMS”)

GetScenarioNames

MotionSession.GetScenarioNames

Get all scenario names

Signature GetScenarioNames(masterPart)

Parameters:masterPart (NXOpen.NXObject) – the master part object
Returns: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”)