Session Class¶
-
class
NXOpen.
Session
¶ Bases:
NXOpen.BaseSession
Represents the NX session.
For language bindings that support remoting, the server must export it for this class to be obtained by a client.
New in version NX3.0.0.
Properties¶
Property | Description |
---|---|
ActiveSketch | Returns the active sketch |
ApplicationName | Returns the name of the current application. |
ExecutingJournal | Returns the full path to the journal that is currently being executed |
IsBatch | Returns true if and only if NX is batch mode (or in other words not running interactively). |
IsInTaskEnvironment | Returns true if and only if NX is in a task environment |
NewestVisibleUndoMark | Returns the newest visible undo mark |
TransientPartPersistencePolicy | Returns or sets the persistence policy for transient parts in the session |
AfuManager | Returns the NXOpen.CAE.AfuManager belonging to this session |
DexManager | Returns the NXOpen.DexManager belonging to this session |
PvtransManager | Returns the NXOpen.PvtransManager belonging to this session |
FTKManager | Returns the NXOpen.CAE.FTK.FTKManager belonging to this session |
Post | Returns the NXOpen.CAE.Post belonging to this session |
ResultManager | Returns the NXOpen.CAE.ResultManager belonging to this session |
CaeSession | Returns the NXOpen.CAE.CaeSession belonging to this session |
UpdateManager | Returns the NXOpen.Update belonging to this session |
Parts | Returns the NXOpen.PartCollection belonging to this session |
WeldCustomManager | Returns the NXOpen.Weld.CustomManager belonging to this session |
ValidationManager | Returns the NXOpen.Validate.ValidationManager belonging to this session |
ListingWindow | Returns the NXOpen.ListingWindow belonging to this session |
SpreadsheetManager | Returns the NXOpen.SpreadsheetManager belonging to this session |
DisplayManager | Returns the NXOpen.DisplayManager belonging to this session |
MathUtils | Returns the NXOpen.MathUtils instance belonging to this session |
EngineeringFunction | Returns the NXOpen.EngineeringFunction instance belonging to this session |
Measurement | Returns the NXOpen.Measurement instance belonging to this session |
Information | Returns the NXOpen.Information instance belonging to this session |
Preferences | Returns the preferences instance for the session |
LogFile | Returns the log file instance for this session |
CAMSession | Returns the CAM session |
DesignRuleManager | Returns the NXOpen.Routing.DesignRuleManager . |
RouteCustomManager | Returns the NXOpen.Routing.CustomManager for this session. |
OptionsManager | Returns the NXOpen.Options.OptionsManager instance belonging to this session |
LicenseManager | Returns the NXOpen.LicenseManager belonging to this session |
UserDefinedClassManager | Returns the NXOpen.UserDefinedObjects.UserDefinedClassManager belonging to this session |
AssembliesUtils | Returns the NXOpen.AssembliesUtils instance belonging to this session |
DrawingUtils | Returns the NXOpen.DrawingUtils instance belonging to this session |
RequirementUtils | Returns the NXOpen.PDM.RequirementUtils instance belonging to this session |
MotionSession | Returns the Motion session |
MotionSimulation | Returns the Motion session |
PdmSearchManager | Returns the NXOpen.PDM.PdmSearchManager instance belonging to this session |
XmlComparator | Returns the NXOpen.Validate.XmlComparator instance belonging to this session |
DataManager | Returns the NXOpen.CAE.FTK.DataManager belonging to this session |
VisualReportManager | Returns the NXOpen.VisualReporting.VisualReportManager instance belonging to this session |
XYPlotManager | Returns the NXOpen.CAE.Xyplot.XYPlotManager belonging to this session |
PdmSession | Returns the NXOpen.PDM.PdmSession belonging to this session |
ToolingSession | Returns the NXOpen.Tooling.ToolingSession belonging to this session |
UserDefinedFeatureClassManager | Returns the NXOpen.Features.UserDefinedFeatureClassManager belonging to this session |
IssueManager | Returns the NXOpen.Issue.IssueManager belonging to this session |
AttributeManager | Returns the NXOpen.AttributeManager belonging to this session |
LinkedPartManager | Returns the NXOpen.LinkedPartManager belonging to this session |
CollaborativeContentManager | Returns the NXOpen.CollaborativeContentManager belonging to this session |
MechatronicsSession | Returns the NXOpen.Mechatronics.MechatronicsSession belonging to this session |
ConfigurationManager | Returns the NXOpen.PDM.ConfigurationManager belonging to this session |
BookmarkFile | Returns the NXOpen.Gateway.BookmarkFile belonging to this session |
SubdivisionTaskEnvironment | Returns the NXOpen.SubdivisionTaskEnvironment belonging to this session |
WeldCpdUtils | Returns the NXOpen.Weld.WeldCpdUtils instance belonging to this session |
MarkupManager | Returns the NXOpen.Markup.MarkupManager instance belonging to this session |
CustomFeatureClassManager | Returns the NXOpen.Features.CustomFeatureClassManager belonging to this session |
PostConfiguratorManager | Returns the NXOpen.SIM.PostConfigurator.PostConfiguratorManager instance belonging to this session |
JournalManager | Returns the JournalManager instance belonging to this session |
WebAppSession | Returns the NXOpen.PDM.WebAppSession belonging to this session |
ReportManager | Returns the NXOpen.Report.ReportManager belonging to this session. |
ShipSession | Returns the NXOpen.ShipDesign.ShipSession belonging to this session. |
SheetManager | Returns the SheetManager instance belonging to this session |
PolygonModelingTaskEnvironment | Returns the NXOpen.PolygonModelingTaskEnvironment belonging to this session |
Methods¶
Method | Description |
---|---|
ApplicationSwitchImmediate | Registers a request to immediately switch to the specified application and open the corresponding user environment. |
AssignRemoveProjects | Assign or remove projects to/from objects |
AssignRemoveProjectsBasedOnPartOccs | Assign or remove projects to/from CPD objects |
BeginTaskEnvironment | This method is called by the NX user interface before entering a task environment. |
CleanUpFacetedFacesAndEdges | Deletes all NXOpen.Facet.FacetedFace and NXOpen.Facet.FacetedEdge objects in the current session |
CreateCamSession | Create the CAM session |
CreateInspectionSession | Create the Inspection session |
CreateTableEditorDefaultDataProvider | Creates a data provider for a table editor. |
DeleteAllUndoMarks | Deletes all undo marks |
DeleteTransientDynamicSectionCutData | Delete transient data associated with NXOpen.Display.DynamicSectionCut objects in the session. |
DeleteUndoMark | Deletes an undo mark. |
DeleteUndoMarksSetInTaskEnvironment | This method deletes all the undo marks that have been created since entering the task environment via NXOpen.Session.BeginTaskEnvironment() . |
DeleteUndoMarksUpToMark | Deletes all undo marks up to and including the specified mark. |
DoesUndoMarkExist | Returns true if the specified mark exists |
EnableRedo | Enable redo for NXOpen programs. |
EndTaskEnvironment | This method is called by the NX user interface when leaving a task environment. |
Execute | Invokes a method in a managed library. |
ExecuteGrip | Call a grip subroutine. |
ExitPartNavigator | Exits the part navigator |
FreezePartNavigator | Freeze Part Navigator updates. |
GetAllUndoMarks | Returns a list of all the undo marks with the specified visibility |
GetClasses | Gets a list of the classes defined in the current session |
GetEnvironmentVariableValue | Returns the value of a NX enviroment variable |
GetNamedProperties | Gets a list of the named properties of this object |
GetNewestUndoMark | Returns the newest undo mark with the specified visibility |
GetProperty | Gets a named property of the object. |
GetUndoMarkName | Returns the name of the specified undo mark |
GetUndoMarkVisibility | Returns the visibility of the specified undo mark |
IsCamSessionInitialized | Check if the CAM session is initialized |
IsInspectionSessionInitialized | Check if the Inspection session is initialized |
IsPartNavigatorFrozen | Check if the Part Navigator update is frozen |
IsPartNavigatorOpen | Check if the Part Navigator is open or close |
NewCaeGrmsearch | Creates a new CAE GRM Search object |
NewDatabasePersistentOptions | Creates a new database persistent option controller |
NewDatabaseSessionOptions | Creates a new database session option controller |
NewErrorList | Creates a new error list. |
NewPartCleanup | Constructs a new PartCleanup object. |
NewTransientText | Returns a new NXOpen.Display.TransientText object |
OpenPartNavigator | Opens the part navigator |
Redo | Redo the last undo if possible. |
SetEnvironmentVariableValue | Sets the value of a NX enviroment variable |
SetProperty | Sets a named property of the object. |
SetUndoMark | Creates an undo mark |
SetUndoMarkName | Sets the name of the undo mark |
SetUndoMarkVisibility | Sets the visibility of the specified undo mark |
UndoLastNVisibleMarks | Undo to a specified number of visible marks starting with the most recently created visible mark. |
UndoToLastVisibleMark | Undo to last visible mark. |
UndoToMark | Undo to the specified mark |
UndoToMarkWithStatus | Undo to the specified mark and output status to status bar. |
UnfreezePartNavigator | Unfreeze Part Navigator updates. |
Enumerations¶
SessionLibraryUnloadOption Enumeration | Describes when an automation library should be unloaded from a running session. |
SessionMarkVisibility Enumeration | Indicates the visibility of an undo mark |
SessionProjectAssignmentObjectType Enumeration | Indicates whether project assignment is for item, item revision or dataset |
SessionProjectAssignmentState Enumeration | Indicates project assignment state |
SessionTransientPartPolicy Enumeration | Persistence policies for transient modified parts |
Structs¶
SessionUndoMarkData_Struct Struct | This structure contains data about an undo mark |
Property Detail¶
ActiveSketch¶
-
Session.
ActiveSketch
¶ Returns the active sketch
-------------------------------------
Getter Method
Signature
ActiveSketch
Returns: Return type: NXOpen.Sketch
New in version NX3.0.0.
License requirements: None.
ApplicationName¶
-
Session.
ApplicationName
¶ Returns the name of the current application.
-------------------------------------
Getter Method
Signature
ApplicationName
Returns: Name of requested application Return type: str New in version NX10.0.0.
License requirements: None.
ExecutingJournal¶
-
Session.
ExecutingJournal
¶ Returns the full path to the journal that is currently being executed
-------------------------------------
Getter Method
Signature
ExecutingJournal
Returns: Return type: str New in version NX3.0.0.
License requirements: None.
IsBatch¶
-
Session.
IsBatch
¶ Returns true if and only if NX is batch mode (or in other words not running interactively).
-------------------------------------
Getter Method
Signature
IsBatch
Returns: Return type: bool New in version NX8.0.3.
License requirements: None.
IsInTaskEnvironment¶
-
Session.
IsInTaskEnvironment
¶ Returns true if and only if NX is in a task environment
-------------------------------------
Getter Method
Signature
IsInTaskEnvironment
Returns: Return type: bool New in version NX3.0.0.
License requirements: None.
NewestVisibleUndoMark¶
-
Session.
NewestVisibleUndoMark
¶ Returns the newest visible undo mark
-------------------------------------
Getter Method
Signature
NewestVisibleUndoMark
Returns: ID of the next visible undo mark. This will be zero if there are no visible undo marks :rtype: int
New in version NX3.0.0.
License requirements: None.
TransientPartPersistencePolicy¶
-
Session.
TransientPartPersistencePolicy
¶ Returns or sets the persistence policy for transient parts in the session
-------------------------------------
Getter Method
Signature
TransientPartPersistencePolicy
Returns: Return type: NXOpen.SessionTransientPartPolicy
New in version NX4.0.0.
License requirements: None.
-------------------------------------
Setter Method
Signature
TransientPartPersistencePolicy
Parameters: policy ( NXOpen.SessionTransientPartPolicy
) –New in version NX4.0.0.
License requirements: None.
AfuManager¶
-
Session.
AfuManager
¶ Returns the
NXOpen.CAE.AfuManager
belonging to this sessionSignature
AfuManager
New in version NX3.0.0.
Returns: Return type: NXOpen.CAE.AfuManager
DexManager¶
-
Session.
DexManager
¶ Returns the
NXOpen.DexManager
belonging to this sessionSignature
DexManager
New in version NX3.0.0.
Returns: Return type: NXOpen.DexManager
PvtransManager¶
-
Session.
PvtransManager
¶ Returns the
NXOpen.PvtransManager
belonging to this sessionSignature
PvtransManager
New in version NX8.5.0.
Returns: Return type: NXOpen.PvtransManager
FTKManager¶
-
Session.
FTKManager
¶ Returns the
NXOpen.CAE.FTK.FTKManager
belonging to this sessionSignature
FTKManager
New in version NX3.0.0.
Returns: Return type: NXOpen.CAE.FTK.FTKManager
Post¶
-
Session.
Post
¶ Returns the
NXOpen.CAE.Post
belonging to this sessionSignature
Post
New in version NX3.0.0.
Returns: Return type: NXOpen.CAE.Post
ResultManager¶
-
Session.
ResultManager
¶ Returns the
NXOpen.CAE.ResultManager
belonging to this sessionSignature
ResultManager
New in version NX6.0.2.
Returns: Return type: NXOpen.CAE.ResultManager
CaeSession¶
-
Session.
CaeSession
¶ Returns the
NXOpen.CAE.CaeSession
belonging to this sessionSignature
CaeSession
New in version NX7.5.0.
Returns: Return type: NXOpen.CAE.CaeSession
UpdateManager¶
-
Session.
UpdateManager
¶ Returns the
NXOpen.Update
belonging to this sessionSignature
UpdateManager
New in version NX3.0.0.
Returns: Return type: NXOpen.Update
Parts¶
-
Session.
Parts
¶ Returns the
NXOpen.PartCollection
belonging to this sessionSignature
Parts
New in version NX3.0.0.
Returns: Return type: NXOpen.PartCollection
WeldCustomManager¶
-
Session.
WeldCustomManager
¶ Returns the
NXOpen.Weld.CustomManager
belonging to this sessionSignature
WeldCustomManager
New in version NX8.0.0.
Returns: Return type: NXOpen.Weld.CustomManager
ValidationManager¶
-
Session.
ValidationManager
¶ Returns the
NXOpen.Validate.ValidationManager
belonging to this sessionSignature
ValidationManager
New in version NX7.5.0.
Returns: Return type: NXOpen.Validate.ValidationManager
ListingWindow¶
-
Session.
ListingWindow
¶ Returns the
NXOpen.ListingWindow
belonging to this sessionSignature
ListingWindow
New in version NX3.0.0.
Returns: Return type: NXOpen.ListingWindow
SpreadsheetManager¶
-
Session.
SpreadsheetManager
¶ Returns the
NXOpen.SpreadsheetManager
belonging to this sessionSignature
SpreadsheetManager
New in version NX11.0.0.
Returns: Return type: NXOpen.SpreadsheetManager
DisplayManager¶
-
Session.
DisplayManager
¶ Returns the
NXOpen.DisplayManager
belonging to this sessionSignature
DisplayManager
New in version NX3.0.0.
Returns: Return type: NXOpen.DisplayManager
MathUtils¶
-
Session.
MathUtils
¶ Returns the
NXOpen.MathUtils
instance belonging to this sessionSignature
MathUtils
New in version NX3.0.0.
Returns: Return type: NXOpen.MathUtils
EngineeringFunction¶
-
Session.
EngineeringFunction
¶ Returns the
NXOpen.EngineeringFunction
instance belonging to this sessionSignature
EngineeringFunction
New in version NX3.0.0.
Returns: Return type: NXOpen.EngineeringFunction
Measurement¶
-
Session.
Measurement
¶ Returns the
NXOpen.Measurement
instance belonging to this sessionSignature
Measurement
New in version NX3.0.0.
Returns: Return type: NXOpen.Measurement
Information¶
-
Session.
Information
¶ Returns the
NXOpen.Information
instance belonging to this sessionSignature
Information
New in version NX3.0.0.
Returns: Return type: NXOpen.Information
Preferences¶
-
Session.
Preferences
¶ Returns the preferences instance for the session
Signature
Preferences
New in version NX3.0.0.
Returns: Return type: NXOpen.Preferences.SessionPreferences
LogFile¶
-
Session.
LogFile
¶ Returns the log file instance for this session
Signature
LogFile
New in version NX3.0.0.
Returns: Return type: NXOpen.LogFile
CAMSession¶
-
Session.
CAMSession
¶ Returns the CAM session
Signature
CAMSession
New in version NX3.0.0.
Returns: Return type: NXOpen.CAM.CAMSession
DesignRuleManager¶
-
Session.
DesignRuleManager
¶ Returns the
NXOpen.Routing.DesignRuleManager
.Signature
DesignRuleManager
New in version NX3.0.0.
Returns: Return type: NXOpen.Routing.DesignRuleManager
RouteCustomManager¶
-
Session.
RouteCustomManager
¶ Returns the
NXOpen.Routing.CustomManager
for this session.Signature
RouteCustomManager
New in version NX12.0.0.
Returns: Return type: NXOpen.Routing.CustomManager
OptionsManager¶
-
Session.
OptionsManager
¶ Returns the
NXOpen.Options.OptionsManager
instance belonging to this sessionSignature
OptionsManager
New in version NX3.0.0.
Returns: Return type: NXOpen.Options.OptionsManager
LicenseManager¶
-
Session.
LicenseManager
¶ Returns the
NXOpen.LicenseManager
belonging to this sessionSignature
LicenseManager
New in version NX3.0.0.
Returns: Return type: NXOpen.LicenseManager
UserDefinedClassManager¶
-
Session.
UserDefinedClassManager
¶ Returns the
NXOpen.UserDefinedObjects.UserDefinedClassManager
belonging to this sessionSignature
UserDefinedClassManager
New in version NX3.0.0.
Returns: Return type: NXOpen.UserDefinedObjects.UserDefinedClassManager
AssembliesUtils¶
-
Session.
AssembliesUtils
¶ Returns the
NXOpen.AssembliesUtils
instance belonging to this sessionSignature
AssembliesUtils
New in version NX3.0.0.
Returns: Return type: NXOpen.AssembliesUtils
DrawingUtils¶
-
Session.
DrawingUtils
¶ Returns the
NXOpen.DrawingUtils
instance belonging to this sessionSignature
DrawingUtils
New in version NX8.5.3.
Returns: Return type: NXOpen.DrawingUtils
RequirementUtils¶
-
Session.
RequirementUtils
¶ Returns the
NXOpen.PDM.RequirementUtils
instance belonging to this sessionSignature
RequirementUtils
New in version NX6.0.3.
Returns: Return type: NXOpen.PDM.RequirementUtils
MotionSession¶
-
Session.
MotionSession
¶ Returns the Motion session
Signature
MotionSession
New in version NX3.0.0.
Returns: Return type: NXOpen.Motion.MotionSession
MotionSimulation¶
-
Session.
MotionSimulation
¶ Returns the Motion session
Signature
MotionSimulation
New in version NX3.0.0.
Returns: Return type: NXOpen.Motion.MotionSimulation
PdmSearchManager¶
-
Session.
PdmSearchManager
¶ Returns the
NXOpen.PDM.PdmSearchManager
instance belonging to this sessionSignature
PdmSearchManager
New in version NX3.0.0.
Returns: Return type: NXOpen.PDM.PdmSearchManager
XmlComparator¶
-
Session.
XmlComparator
¶ Returns the
NXOpen.Validate.XmlComparator
instance belonging to this sessionSignature
XmlComparator
New in version NX6.0.2.
Returns: Return type: NXOpen.Validate.XmlComparator
DataManager¶
-
Session.
DataManager
¶ Returns the
NXOpen.CAE.FTK.DataManager
belonging to this sessionSignature
DataManager
New in version NX7.5.0.
Returns: Return type: NXOpen.CAE.FTK.DataManager
VisualReportManager¶
-
Session.
VisualReportManager
¶ Returns the
NXOpen.VisualReporting.VisualReportManager
instance belonging to this sessionSignature
VisualReportManager
New in version NX7.0.0.
Returns: Return type: NXOpen.VisualReporting.VisualReportManager
XYPlotManager¶
-
Session.
XYPlotManager
¶ Returns the
NXOpen.CAE.Xyplot.XYPlotManager
belonging to this sessionSignature
XYPlotManager
New in version NX7.5.0.
Returns: Return type: NXOpen.CAE.Xyplot.XYPlotManager
PdmSession¶
-
Session.
PdmSession
¶ Returns the
NXOpen.PDM.PdmSession
belonging to this sessionSignature
PdmSession
New in version NX7.5.0.
Returns: Return type: NXOpen.PDM.PdmSession
ToolingSession¶
-
Session.
ToolingSession
¶ Returns the
NXOpen.Tooling.ToolingSession
belonging to this sessionSignature
ToolingSession
New in version NX8.0.0.
Returns: Return type: NXOpen.Tooling.ToolingSession
UserDefinedFeatureClassManager¶
-
Session.
UserDefinedFeatureClassManager
¶ Returns the
NXOpen.Features.UserDefinedFeatureClassManager
belonging to this sessionSignature
UserDefinedFeatureClassManager
New in version NX8.0.0.
Returns: Return type: NXOpen.Features.UserDefinedFeatureClassManager
IssueManager¶
-
Session.
IssueManager
¶ Returns the
NXOpen.Issue.IssueManager
belonging to this sessionSignature
IssueManager
New in version NX8.5.0.
Returns: Return type: NXOpen.Issue.IssueManager
AttributeManager¶
-
Session.
AttributeManager
¶ Returns the
NXOpen.AttributeManager
belonging to this sessionSignature
AttributeManager
New in version NX8.5.0.
Returns: Return type: NXOpen.AttributeManager
LinkedPartManager¶
-
Session.
LinkedPartManager
¶ Returns the
NXOpen.LinkedPartManager
belonging to this sessionSignature
LinkedPartManager
New in version NX8.5.0.
Returns: Return type: NXOpen.LinkedPartManager
CollaborativeContentManager¶
-
Session.
CollaborativeContentManager
¶ Returns the
NXOpen.CollaborativeContentManager
belonging to this sessionSignature
CollaborativeContentManager
New in version NX8.5.0.
Returns: Return type: NXOpen.CollaborativeContentManager
MechatronicsSession¶
-
Session.
MechatronicsSession
¶ Returns the
NXOpen.Mechatronics.MechatronicsSession
belonging to this sessionSignature
MechatronicsSession
New in version NX9.0.0.
Returns: Return type: NXOpen.Mechatronics.MechatronicsSession
ConfigurationManager¶
-
Session.
ConfigurationManager
¶ Returns the
NXOpen.PDM.ConfigurationManager
belonging to this sessionSignature
ConfigurationManager
New in version NX9.0.0.
Returns: Return type: NXOpen.PDM.ConfigurationManager
BookmarkFile¶
-
Session.
BookmarkFile
¶ Returns the
NXOpen.Gateway.BookmarkFile
belonging to this sessionSignature
BookmarkFile
New in version NX10.0.0.
Returns: Return type: NXOpen.Gateway.BookmarkFile
SubdivisionTaskEnvironment¶
-
Session.
SubdivisionTaskEnvironment
¶ Returns the
NXOpen.SubdivisionTaskEnvironment
belonging to this sessionSignature
SubdivisionTaskEnvironment
New in version NX9.0.0.
Returns: Return type: NXOpen.SubdivisionTaskEnvironment
WeldCpdUtils¶
-
Session.
WeldCpdUtils
¶ Returns the
NXOpen.Weld.WeldCpdUtils
instance belonging to this sessionSignature
WeldCpdUtils
New in version NX9.0.0.
Returns: Return type: NXOpen.Weld.WeldCpdUtils
MarkupManager¶
-
Session.
MarkupManager
¶ Returns the
NXOpen.Markup.MarkupManager
instance belonging to this sessionSignature
MarkupManager
New in version NX10.0.0.
Returns: Return type: NXOpen.Markup.MarkupManager
CustomFeatureClassManager¶
-
Session.
CustomFeatureClassManager
¶ Returns the
NXOpen.Features.CustomFeatureClassManager
belonging to this sessionSignature
CustomFeatureClassManager
New in version NX11.0.0.
Returns: Return type: NXOpen.Features.CustomFeatureClassManager
PostConfiguratorManager¶
-
Session.
PostConfiguratorManager
¶ Returns the
NXOpen.SIM.PostConfigurator.PostConfiguratorManager
instance belonging to this sessionSignature
PostConfiguratorManager
New in version NX10.0.3.
Returns: Return type: NXOpen.SIM.PostConfigurator.PostConfiguratorManager
JournalManager¶
-
Session.
JournalManager
¶ Returns the JournalManager instance belonging to this session
Signature
JournalManager
New in version NX11.0.0.
Returns: Return type: NXOpen.JournalManager
WebAppSession¶
-
Session.
WebAppSession
¶ Returns the
NXOpen.PDM.WebAppSession
belonging to this sessionSignature
WebAppSession
New in version NX11.0.0.
Returns: Return type: NXOpen.PDM.WebAppSession
ReportManager¶
-
Session.
ReportManager
¶ Returns the
NXOpen.Report.ReportManager
belonging to this session.Signature
ReportManager
New in version NX11.0.0.
Returns: Return type: NXOpen.Report.ReportManager
ShipSession¶
-
Session.
ShipSession
¶ Returns the
NXOpen.ShipDesign.ShipSession
belonging to this session.Signature
ShipSession
New in version NX11.0.0.
Returns: Return type: NXOpen.ShipDesign.ShipSession
SheetManager¶
-
Session.
SheetManager
¶ Returns the SheetManager instance belonging to this session
Signature
SheetManager
New in version NX12.0.0.
Returns: Return type: NXOpen.Diagramming.SheetManager
PolygonModelingTaskEnvironment¶
-
Session.
PolygonModelingTaskEnvironment
¶ Returns the
NXOpen.PolygonModelingTaskEnvironment
belonging to this sessionSignature
PolygonModelingTaskEnvironment
New in version NX12.0.0.
Returns: Return type: NXOpen.PolygonModelingTaskEnvironment
Method Detail¶
ApplicationSwitchImmediate¶
-
Session.
ApplicationSwitchImmediate
¶ Registers a request to immediately switch to the specified application and open the corresponding user environment.
The current application will change immediately. This is only supported when running interactively. It is not supported in batch mode. The argument is an application button name as specified and registered in a Menuscript file. For example specify UG_APP_MODELING to enter the modeling application.
Signature
ApplicationSwitchImmediate(applicationName)
Parameters: applicationName (str) – Button name of requested application New in version NX10.0.0.
License requirements: None.
AssignRemoveProjects¶
-
Session.
AssignRemoveProjects
¶ Assign or remove projects to/from objects
Signature
AssignRemoveProjects(cliNames, objectTypes, projectNames, assignmentStates)
Parameters: - cliNames (list of str) – cli names of the objects to assign projects to
- objectTypes (list of
NXOpen.SessionProjectAssignmentObjectType
) – one of item, item rev or dataset type - projectNames (list of str) – names of the projects to assign
- assignmentStates (list of
NXOpen.SessionProjectAssignmentState
) – assignment states
New in version NX6.0.0.
License requirements: None.
AssignRemoveProjectsBasedOnPartOccs¶
-
Session.
AssignRemoveProjectsBasedOnPartOccs
¶ Assign or remove projects to/from CPD objects
Signature
AssignRemoveProjectsBasedOnPartOccs(partOccs, objectTypes, projectNames, assignmentStates)
Parameters: - partOccs (list of
NXOpen.TaggedObject
) – Array of components to assign/remove projects to - objectTypes (list of
NXOpen.SessionProjectAssignmentObjectType
) – currently only DE - projectNames (list of str) – names of the projects to assign
- assignmentStates (list of
NXOpen.SessionProjectAssignmentState
) – assignment states
New in version NX8.5.0.
License requirements: None.
- partOccs (list of
BeginTaskEnvironment¶
-
Session.
BeginTaskEnvironment
¶ This method is called by the NX user interface before entering a task environment.
This method will make invisible all the undo marks that currently exist. The reason for doing this is so that the user sees only the undo marks created in the task environment. The method
NXOpen.Session.EndTaskEnvironment()
will restore the marks to the visibility that they had before this method was called. This method should not be called if NX is already in a task environment.Signature
BeginTaskEnvironment()
New in version NX3.0.0.
License requirements: None.
CleanUpFacetedFacesAndEdges¶
-
Session.
CleanUpFacetedFacesAndEdges
¶ Deletes all
NXOpen.Facet.FacetedFace
andNXOpen.Facet.FacetedEdge
objects in the current sessionSignature
CleanUpFacetedFacesAndEdges()
New in version NX5.0.0.
License requirements: None.
CreateCamSession¶
-
Session.
CreateCamSession
¶ Create the CAM session
Signature
CreateCamSession()
New in version NX4.0.0.
License requirements: None.
CreateInspectionSession¶
-
Session.
CreateInspectionSession
¶ Create the Inspection session
Signature
CreateInspectionSession()
New in version NX7.0.0.
License requirements: None.
CreateTableEditorDefaultDataProvider¶
-
Session.
CreateTableEditorDefaultDataProvider
¶ Creates a data provider for a table editor.
Signature
CreateTableEditorDefaultDataProvider(part)
Parameters: part ( NXOpen.BasePart
) – The part that owns the data provider. The owner is not strictly required (that is, it can be None), but its use is suggested if a part exists to ensure proper cleanup of the builder in case the client does not explicitly clean it up properly.Returns: Return type: NXOpen.TableEditorDefaultDataProvider
New in version NX10.0.0.
License requirements: None.
DeleteAllUndoMarks¶
-
Session.
DeleteAllUndoMarks
¶ Deletes all undo marks
Signature
DeleteAllUndoMarks()
New in version NX3.0.0.
License requirements: None.
DeleteTransientDynamicSectionCutData¶
-
Session.
DeleteTransientDynamicSectionCutData
¶ Delete transient data associated with
NXOpen.Display.DynamicSectionCut
objects in the session.One example of transient data generation is measurement to a dynamic section-cut. Transient section curves are generated in order to perform non-associative measurement. These transient curves are destroyed once measurement operation is finished.
Signature
DeleteTransientDynamicSectionCutData()
Returns: Indicates whether any transient data is deleted. Return type: bool New in version NX10.0.0.
License requirements: None.
DeleteUndoMark¶
-
Session.
DeleteUndoMark
¶ Deletes an undo mark.
If you want to delete a mark and all marks that were created after that mark, use
DeleteUndoMarksUpToMark()
instead.Signature
DeleteUndoMark(markId, markName)
Parameters: - markId (int) – ID of mark
- markName (str) – Name of mark. Used only if mark_id not found
New in version NX3.0.0.
License requirements: None.
DeleteUndoMarksSetInTaskEnvironment¶
-
Session.
DeleteUndoMarksSetInTaskEnvironment
¶ This method deletes all the undo marks that have been created since entering the task environment via
NXOpen.Session.BeginTaskEnvironment()
.An exception will be thrown if this method is called when NX is not in a task environment.
Signature
DeleteUndoMarksSetInTaskEnvironment()
New in version NX3.0.0.
License requirements: None.
DeleteUndoMarksUpToMark¶
-
Session.
DeleteUndoMarksUpToMark
¶ Deletes all undo marks up to and including the specified mark.
If you only want to delete a mark, but do not want to delete the marks that were created after that mark, use
DeleteUndoMark()
instead.Signature
DeleteUndoMarksUpToMark(markId, markName, deleteAllIfNotFound)
Parameters: - markId (int) – ID of mark
- markName (str) – Name of mark. Used only if mark_id not found
- deleteAllIfNotFound (bool) – Whether to delete all marks if the specified mark is not found
New in version NX3.0.0.
License requirements: None.
DoesUndoMarkExist¶
-
Session.
DoesUndoMarkExist
¶ Returns true if the specified mark exists
Signature
DoesUndoMarkExist(markId, markName)
Parameters: - markId (int) – ID of mark
- markName (str) – Name of the mark. Used only if mark_id not found
Returns: True if and only if the mark exists
Return type: bool
New in version NX3.0.0.
License requirements: None.
EnableRedo¶
-
Session.
EnableRedo
¶ Enable redo for NXOpen programs.
As default redo is enabled in NX. One can disable redo to save memory for memory intensive NX Open programs. After the NX Open program is executed redo will be restored back to enabled state. In case redo is enabled from previous disbaled state , it must be done just before setting a undo mark. Note that, redo is not supported for the visible marks set before making this call.
Signature
EnableRedo(enableRedo)
Parameters: enableRedo (bool) – True will enable redo for NXOpen programs. False should disable the redo for NXOpen programs Returns: Returns previous redo state Return type: bool New in version NX7.5.3.
License requirements: None.
EndTaskEnvironment¶
-
Session.
EndTaskEnvironment
¶ This method is called by the NX user interface when leaving a task environment.
This method will make visible all the undo marks that were made invisible by
NXOpen.Session.BeginTaskEnvironment()
. An exception will be thrown if this method is called when NX is not in a task environment.Signature
EndTaskEnvironment()
New in version NX3.0.0.
License requirements: None.
Execute¶
-
Session.
Execute
¶ Invokes a method in a managed library.
Currently supported library types include a Java jar or class file, a Common Language Runtime (.NET) dll, or a Python script. The input arguments should not contain KF attributes vector, point and frame Instead it should be passed as double[3], double[3] and double[16] respectively. For Python, only class bound staticmethods and global functions can be invoked. Do not use this method for other Python methods since the behavior is undefined.
Signature
Execute(libName, className, methodName, inputArgs)
Parameters: - libName (str) – Name of the library containing the method. The full path to the library is required.
- className (str) – Name of the class
- methodName (str) – Name of the method to invoke
- inputArgs (list of Variant) – Input arguments for managed method
Returns: Return argument for managed method
Return type: Variant
New in version NX5.0.0.
License requirements: None.
ExecuteGrip¶
-
Session.
ExecuteGrip
¶ Call a grip subroutine.
The input argument is an array of objects of mixed types. Each element in the array corresponds to an input argument of the Grip program. The grip program receives its arguments via the UFARGS grip statement and the order of values in the array matches the order of variables in that statement.
Argument types supported in .NET and Java are Double, String and subclasses of TaggedObject as well as simple arrays of these types. These map to NUMBER, STRING and ENTITY types in Grip.
For arrays the caller should ensure that actual array passed in matches the length of the array declared in grip otherwise an error will occur.
The return value is a similar array containing the values of the Grip variables after the program has run.
C/C++ applications will need to use UF_call_grip for this purpose.
Signature
ExecuteGrip(gripExecutable, inputArgs)
Parameters: - gripExecutable (str) – Name of Grip executable to run
- inputArgs (list of Variant) – Input arguments for Grip subroutine
Returns: Output arguments for Grip subroutine
Return type: list of Variant
New in version NX3.0.0.
License requirements: grip_execute (“GRIP EXECUTE”)
GetAllUndoMarks¶
-
Session.
GetAllUndoMarks
¶ Returns a list of all the undo marks with the specified visibility
Signature
GetAllUndoMarks(visibility)
Parameters: visibility ( NXOpen.SessionMarkVisibility
) – Used to limit the results to marks with the specified visibilityReturns: List of the undo marks Return type: list of NXOpen.SessionUndoMarkData_Struct
New in version NX3.0.0.
License requirements: None.
GetClasses¶
-
Session.
GetClasses
¶ Gets a list of the classes defined in the current session
Signature
GetClasses()
Returns: array of class names Return type: list of str New in version NX5.0.0.
License requirements: None.
GetEnvironmentVariableValue¶
-
Session.
GetEnvironmentVariableValue
¶ Returns the value of a NX enviroment variable
Signature
GetEnvironmentVariableValue(envVaribable)
Parameters: envVaribable (str) – the environment variable name, which may be case sensitive on some platforms Returns: the value assigned to this environment variable Return type: str New in version NX7.5.0.
License requirements: None.
GetNamedProperties¶
-
Session.
GetNamedProperties
¶ Overloaded method GetNamedProperties
GetNamedProperties(object)
GetNamedProperties(className)
-------------------------------------
Gets a list of the named properties of this object
Signature
GetNamedProperties(object)
Parameters: object ( NXOpen.TaggedObject
) – The object to queryReturns: array of property names Return type: list of str New in version NX5.0.0.
License requirements: None.
-------------------------------------
Gets a list of the named properties of a named class
Signature
GetNamedProperties(className)
Parameters: className (str) – The name of the class to query Returns: a tuple Return type: A tuple consisting of (properties, propertyTypes) properties is a list of str. array of property names propertyTypes is a list of str. type name of corresponding property New in version NX5.0.0.
License requirements: None.
-------------------------------------
GetNewestUndoMark¶
-
Session.
GetNewestUndoMark
¶ Returns the newest undo mark with the specified visibility
Signature
GetNewestUndoMark(visibility)
Parameters: visibility ( NXOpen.SessionMarkVisibility
) – the visibility maskReturns: ID of the next undo mark. This will be zero if there are no undo marks :rtype: int
New in version NX3.0.0.
License requirements: None.
GetProperty¶
-
Session.
GetProperty
¶ Gets a named property of the object.
The property names are based upon the properties provided by the NXOpen API.
Signature
GetProperty(object, propertyName)
Parameters: - object (
NXOpen.TaggedObject
) – The object to query - propertyName (str) – The name of the property
Returns: The value of the property, expressed as a string
Return type: str
New in version NX5.0.0.
License requirements: None.
- object (
GetUndoMarkName¶
-
Session.
GetUndoMarkName
¶ Returns the name of the specified undo mark
Signature
GetUndoMarkName(markId)
Parameters: markId (int) – ID of the mark Returns: the mark’s name Return type: str New in version NX3.0.0.
License requirements: None.
GetUndoMarkVisibility¶
-
Session.
GetUndoMarkVisibility
¶ Returns the visibility of the specified undo mark
Signature
GetUndoMarkVisibility(markId, markName)
Parameters: - markId (int) – ID of mark
- markName (str) – Name of the mark. Used only if mark_id not found
Returns: visibility of the mark
Return type: New in version NX3.0.0.
License requirements: None.
IsCamSessionInitialized¶
-
Session.
IsCamSessionInitialized
¶ Check if the CAM session is initialized
Signature
IsCamSessionInitialized()
Returns: Return type: bool New in version NX4.0.0.
License requirements: None.
IsInspectionSessionInitialized¶
-
Session.
IsInspectionSessionInitialized
¶ Check if the Inspection session is initialized
Signature
IsInspectionSessionInitialized()
Returns: Return type: bool New in version NX7.0.0.
License requirements: None.
NewCaeGrmsearch¶
-
Session.
NewCaeGrmsearch
¶ Creates a new CAE GRM Search object
Signature
NewCaeGrmsearch()
Returns: Return type: NXOpen.CAE.GRMSearch
New in version NX8.0.0.
License requirements: None.
NewDatabasePersistentOptions¶
-
Session.
NewDatabasePersistentOptions
¶ Creates a new database persistent option controller
Signature
NewDatabasePersistentOptions()
Returns: Return type: NXOpen.PDM.PersistentSettings
New in version NX4.0.0.
License requirements: None.
NewDatabaseSessionOptions¶
-
Session.
NewDatabaseSessionOptions
¶ Creates a new database session option controller
Signature
NewDatabaseSessionOptions()
Returns: Return type: NXOpen.PDM.SessionSettings
New in version NX4.0.0.
License requirements: None.
NewErrorList¶
-
Session.
NewErrorList
¶ Creates a new error list.
Warning: this method may be removed in a future release
Signature
NewErrorList()
Returns: Return type: NXOpen.ErrorList
New in version NX3.0.0.
License requirements: None.
NewPartCleanup¶
-
Session.
NewPartCleanup
¶ Constructs a new PartCleanup object.
Signature
NewPartCleanup()
Returns: Return type: NXOpen.PartCleanup
New in version NX3.0.0.
License requirements: None.
NewTransientText¶
-
Session.
NewTransientText
¶ Returns a new
NXOpen.Display.TransientText
objectSignature
NewTransientText()
Returns: Return type: NXOpen.Display.TransientText
New in version NX8.0.0.
License requirements: None.
Redo¶
-
Session.
Redo
¶ Redo the last undo if possible.
Only does one mark but may be repeated for all redoable marks. Only marks undone by
UndoLastNVisibleMarks()
are redoable.Signature
Redo()
New in version NX5.0.0.
License requirements: None.
SetEnvironmentVariableValue¶
-
Session.
SetEnvironmentVariableValue
¶ Sets the value of a NX enviroment variable
Signature
SetEnvironmentVariableValue(envVaribable, envValue)
Parameters: - envVaribable (str) – the environment variable name, which may be case sensitive on some platforms
- envValue (str) – the value to be assigned to this environment variable
New in version NX7.5.1.
License requirements: None.
SetProperty¶
-
Session.
SetProperty
¶ Sets a named property of the object.
The property names are based upon the properties provided by the NXOpen API.
Signature
SetProperty(object, propertyName, value)
Parameters: - object (
NXOpen.TaggedObject
) – The object to query - propertyName (str) – The name of the property
- value (str) – The value of the property, expressed as a string
New in version NX5.0.0.
License requirements: None.
- object (
SetUndoMark¶
-
Session.
SetUndoMark
¶ Creates an undo mark
Signature
SetUndoMark(markVisibility, name)
Parameters: - markVisibility (
NXOpen.SessionMarkVisibility
) – - name (str) – mark name
Returns: mark ID
Return type: int
New in version NX3.0.0.
License requirements: None.
- markVisibility (
SetUndoMarkName¶
-
Session.
SetUndoMarkName
¶ Sets the name of the undo mark
Signature
SetUndoMarkName(markId, markName)
Parameters: - markId (int) – ID of the mark
- markName (str) – Name of the mark.
New in version NX3.0.0.
License requirements: None.
SetUndoMarkVisibility¶
-
Session.
SetUndoMarkVisibility
¶ Sets the visibility of the specified undo mark
Signature
SetUndoMarkVisibility(markId, markName, visibility)
Parameters: - markId (int) – ID of mark
- markName (str) – Name of the mark. Used only if mark_id not found
- visibility (
NXOpen.SessionMarkVisibility
) – the new visibility
New in version NX3.0.0.
License requirements: None.
UndoLastNVisibleMarks¶
-
Session.
UndoLastNVisibleMarks
¶ Undo to a specified number of visible marks starting with the most recently created visible mark.
If the number is less than 1, then all visible marks are undone. If the number is greater than the total number of visible marks, then all visible marks will be undone. Marks undone via this routine may be redone via
Redo()
if the operations undone permit it.Signature
UndoLastNVisibleMarks(n)
Parameters: n (int) – Number of visible marks to undo Returns: a tuple Return type: A tuple consisting of (marksRecycled, undoUnavailable) marksRecycled is a bool. True if undo succeeded but no marks remain. This may indicate previous marks have been recycled. undoUnavailable is a bool. True if not all requested marks were undone and the application has locked the undo system. New in version NX3.0.0.
License requirements: None.
UndoToLastVisibleMark¶
-
Session.
UndoToLastVisibleMark
¶ Undo to last visible mark.
This will not delete the undo mark. Use
UndoLastNVisibleMarks()
to delete the undo mark also.Signature
UndoToLastVisibleMark()
New in version NX3.0.0.
License requirements: None.
UndoToMark¶
-
Session.
UndoToMark
¶ Undo to the specified mark
Signature
UndoToMark(markId, markName)
Parameters: - markId (int) – ID of mark to undo to
- markName (str) – Name of mark to undo to. Used only if mark_id not found
New in version NX3.0.0.
License requirements: None.
UndoToMarkWithStatus¶
-
Session.
UndoToMarkWithStatus
¶ Undo to the specified mark and output status to status bar.
Signature
UndoToMarkWithStatus(markId, markName)
Parameters: - markId (int) – ID of mark to undo to
- markName (str) – Name of mark to undo to. Used only if mark_id not found
New in version NX3.0.0.
License requirements: None.