NXOpen .NET Reference  12.0.0
Classes | Public Types | Public Member Functions | Properties | List of all members
NXOpen.Session Class Reference

Represents the NX session. More...

Inheritance diagram for NXOpen.Session:

Classes

struct  UndoMarkData
 This structure contains data about an undo mark More...
 

Public Types

enum  LibraryUnloadOption { Immediately = 1, Explicitly, AtTermination }
 Describes when an automation library should be unloaded from a running session. More...
 
enum  UndoMarkId
 Represents a undo mark. More...
 
enum  MarkVisibility { Visible, Invisible, AnyVisibility }
 Indicates the visibility of an undo mark More...
 
enum  ProjectAssignmentObjectType { Part, Partrev, Appdata, CollaborativeProductDevelopmentDe }
 Indicates whether project assignment is for item, item revision or dataset More...
 
enum  ProjectAssignmentState { None = 10, Partial, Full }
 Indicates project assignment state More...
 
enum  TransientPartPolicy { RetainTransience, RemoveTransience }
 Persistence policies for transient modified parts More...
 

Public Member Functions

unsafe NXOpen.Session.UndoMarkId SetUndoMark (NXOpen.Session.MarkVisibility markVisibility, string name)
 Creates an undo mark More...
 
unsafe void UndoToLastVisibleMark ()
 Undo to last visible mark. More...
 
unsafe void UndoLastNVisibleMarks (int n, out bool marksRecycled, out bool undoUnavailable)
 Undo to a specified number of visible marks starting with the most recently created visible mark. More...
 
unsafe void Redo ()
 Redo the last undo if possible. More...
 
unsafe void UndoToMark (NXOpen.Session.UndoMarkId markId, string markName)
 Undo to the specified mark More...
 
unsafe void UndoToMarkWithStatus (NXOpen.Session.UndoMarkId markId, string markName)
 Undo to the specified mark and output status to status bar. More...
 
unsafe void DeleteUndoMark (NXOpen.Session.UndoMarkId markId, string markName)
 Deletes an undo mark. More...
 
unsafe void DeleteUndoMarksUpToMark (NXOpen.Session.UndoMarkId markId, string markName, bool deleteAllIfNotFound)
 Deletes all undo marks up to and including the specified mark. More...
 
unsafe void DeleteAllUndoMarks ()
 Deletes all undo marks More...
 
unsafe void SetUndoMarkVisibility (NXOpen.Session.UndoMarkId markId, string markName, NXOpen.Session.MarkVisibility visibility)
 Sets the visibility of the specified undo mark More...
 
unsafe
NXOpen.Session.MarkVisibility 
GetUndoMarkVisibility (NXOpen.Session.UndoMarkId markId, string markName)
 Returns the visibility of the specified undo mark More...
 
unsafe string GetUndoMarkName (NXOpen.Session.UndoMarkId markId)
 Returns the name of the specified undo mark More...
 
unsafe void SetUndoMarkName (NXOpen.Session.UndoMarkId markId, string markName)
 Sets the name of the undo mark More...
 
unsafe bool DoesUndoMarkExist (NXOpen.Session.UndoMarkId markId, string markName)
 Returns true if the specified mark exists More...
 
unsafe
NXOpen.Session.UndoMarkData[] 
GetAllUndoMarks (NXOpen.Session.MarkVisibility visibility)
 Returns a list of all the undo marks with the specified visibility More...
 
unsafe NXOpen.Session.UndoMarkId GetNewestUndoMark (NXOpen.Session.MarkVisibility visibility)
 Returns the newest undo mark with the specified visibility More...
 
unsafe void BeginTaskEnvironment ()
 This method is called by the NX user interface before entering a task environment. More...
 
unsafe void DeleteUndoMarksSetInTaskEnvironment ()
 This method deletes all the undo marks that have been created since entering the task environment via NXOpen.Session.BeginTaskEnvironment . More...
 
unsafe void EndTaskEnvironment ()
 This method is called by the NX user interface when leaving a task environment. More...
 
unsafe NXOpen.PartCleanup NewPartCleanup ()
 Constructs a new PartCleanup object. More...
 
unsafe NXOpen.ErrorList NewErrorList ()
 Creates a new error list. More...
 
unsafe NXOpen.PDM.SessionSettings NewDatabaseSessionOptions ()
 Creates a new database session option controller More...
 
unsafe
NXOpen.PDM.PersistentSettings 
NewDatabasePersistentOptions ()
 Creates a new database persistent option controller More...
 
unsafe NXOpen.CAE.GRMSearch NewCaeGrmsearch ()
 Creates a new CAE GRM Search object More...
 
unsafe Object[] ExecuteGrip (string gripExecutable, Object[] inputArgs)
 Call a grip subroutine. More...
 
unsafe Object Execute (string libName, string className, string methodName, Object[] inputArgs)
 Invokes a method in a managed library. More...
 
unsafe void CreateCamSession ()
 Create the CAM session More...
 
unsafe bool IsCamSessionInitialized ()
 Check if the CAM session is initialized More...
 
unsafe void CreateInspectionSession ()
 Create the Inspection session More...
 
unsafe bool IsInspectionSessionInitialized ()
 Check if the Inspection session is initialized More...
 
unsafe string GetProperty (NXOpen.TaggedObject @object, string propertyName)
 Gets a named property of the object. More...
 
unsafe void SetProperty (NXOpen.TaggedObject @object, string propertyName, string value)
 Sets a named property of the object. More...
 
unsafe string[] GetNamedProperties (NXOpen.TaggedObject @object)
 Gets a list of the named properties of this object More...
 
unsafe string[] GetClasses ()
 Gets a list of the classes defined in the current session More...
 
unsafe void GetNamedProperties (string className, out string[] properties, out string[] propertyTypes)
 Gets a list of the named properties of a named class More...
 
unsafe void CleanUpFacetedFacesAndEdges ()
 Deletes all NXOpen.Facet.FacetedFace and NXOpen.Facet.FacetedEdge objects in the current session More...
 
unsafe void AssignRemoveProjects (string[] cliNames, NXOpen.Session.ProjectAssignmentObjectType[] objectTypes, string[] projectNames, NXOpen.Session.ProjectAssignmentState[] assignmentStates)
 Assign or remove projects to/from objects More...
 
unsafe string GetEnvironmentVariableValue (string envVaribable)
 Returns the value of a NX enviroment variable More...
 
unsafe void SetEnvironmentVariableValue (string envVaribable, string envValue)
 Sets the value of a NX enviroment variable More...
 
unsafe bool EnableRedo (bool enableRedo)
 Enable redo for NXOpen programs. More...
 
unsafe NXOpen.Display.TransientText NewTransientText ()
 Returns a new NXOpen.Display.TransientText object More...
 
unsafe void AssignRemoveProjectsBasedOnPartOccs (NXOpen.TaggedObject[] partOccs, NXOpen.Session.ProjectAssignmentObjectType[] objectTypes, string[] projectNames, NXOpen.Session.ProjectAssignmentState[] assignmentStates)
 Assign or remove projects to/from CPD objects More...
 
unsafe void ApplicationSwitchImmediate (string applicationName)
 Registers a request to immediately switch to the specified application and open the corresponding user environment. More...
 
unsafe
NXOpen.TableEditorDefaultDataProvider 
CreateTableEditorDefaultDataProvider (NXOpen.BasePart part)
 Creates a data provider for a table editor. More...
 
unsafe bool DeleteTransientDynamicSectionCutData ()
 Delete transient data associated with NXOpen.Display.DynamicSectionCut objects in the session. More...
 
unsafe void ExitPartNavigator ()
 Exits the part navigator More...
 
unsafe void OpenPartNavigator ()
 Opens the part navigator More...
 
unsafe bool IsPartNavigatorOpen ()
 Check if the Part Navigator is open or close More...
 
unsafe bool IsPartNavigatorFrozen ()
 Check if the Part Navigator update is frozen More...
 
unsafe void FreezePartNavigator ()
 Freeze Part Navigator updates. More...
 
unsafe void UnfreezePartNavigator ()
 Unfreeze Part Navigator updates. More...
 

Properties

NXOpen.CAE.AfuManager AfuManager [get]
 Returns the NXOpen.CAE.AfuManager belonging to this session More...
 
NXOpen.DexManager DexManager [get]
 Returns the NXOpen.DexManager belonging to this session More...
 
NXOpen.PvtransManager PvtransManager [get]
 Returns the NXOpen.PvtransManager belonging to this session More...
 
NXOpen.CAE.FTK.FTKManager FTKManager [get]
 Returns the NXOpen.CAE.FTK.FTKManager belonging to this session More...
 
NXOpen.CAE.Post Post [get]
 Returns the NXOpen.CAE.Post belonging to this session More...
 
NXOpen.CAE.ResultManager ResultManager [get]
 Returns the NXOpen.CAE.ResultManager belonging to this session More...
 
NXOpen.CAE.CaeSession CaeSession [get]
 Returns the NXOpen.CAE.CaeSession belonging to this session More...
 
NXOpen.Update UpdateManager [get]
 Returns the NXOpen.Update belonging to this session More...
 
NXOpen.PartCollection Parts [get]
 Returns the NXOpen.PartCollection belonging to this session More...
 
NXOpen.Weld.CustomManager WeldCustomManager [get]
 Returns the NXOpen.Weld.CustomManager belonging to this session More...
 
NXOpen.Validate.ValidationManager ValidationManager [get]
 Returns the NXOpen.Validate.ValidationManager belonging to this session More...
 
NXOpen.ListingWindow ListingWindow [get]
 Returns the NXOpen.ListingWindow belonging to this session More...
 
NXOpen.SpreadsheetManager SpreadsheetManager [get]
 Returns the NXOpen.SpreadsheetManager belonging to this session More...
 
NXOpen.DisplayManager DisplayManager [get]
 Returns the NXOpen.DisplayManager belonging to this session More...
 
NXOpen.MathUtils MathUtils [get]
 Returns the NXOpen.MathUtils instance belonging to this session More...
 
NXOpen.EngineeringFunction EngineeringFunction [get]
 Returns the NXOpen.EngineeringFunction instance belonging to this session More...
 
NXOpen.Measurement Measurement [get]
 Returns the NXOpen.Measurement instance belonging to this session More...
 
NXOpen.Information Information [get]
 Returns the NXOpen.Information instance belonging to this session More...
 
NXOpen.Preferences.SessionPreferences Preferences [get]
 Returns the preferences instance for the session More...
 
NXOpen.LogFile LogFile [get]
 Returns the log file instance for this session More...
 
NXOpen.CAM.CAMSession CAMSession [get]
 Returns the CAM session More...
 
NXOpen.Routing.DesignRuleManager DesignRuleManager [get]
 Returns the NXOpen.Routing.DesignRuleManager . More...
 
NXOpen.Routing.CustomManager RouteCustomManager [get]
 Returns the NXOpen.Routing.CustomManager for this session. More...
 
NXOpen.Options.OptionsManager OptionsManager [get]
 Returns the NXOpen.Options.OptionsManager instance belonging to this session More...
 
NXOpen.LicenseManager LicenseManager [get]
 Returns the NXOpen.LicenseManager belonging to this session More...
 
NXOpen.UserDefinedObjects.UserDefinedClassManager UserDefinedClassManager [get]
 Returns the NXOpen.UserDefinedObjects.UserDefinedClassManager belonging to this session More...
 
NXOpen.AssembliesUtils AssembliesUtils [get]
 Returns the NXOpen.AssembliesUtils instance belonging to this session More...
 
NXOpen.DrawingUtils DrawingUtils [get]
 Returns the NXOpen.DrawingUtils instance belonging to this session More...
 
NXOpen.PDM.RequirementUtils RequirementUtils [get]
 Returns the NXOpen.PDM.RequirementUtils instance belonging to this session More...
 
NXOpen.Motion.MotionSession MotionSession [get]
 Returns the Motion session More...
 
NXOpen.Motion.MotionSimulation MotionSimulation [get]
 Returns the Motion session More...
 
NXOpen.PDM.PdmSearchManager PdmSearchManager [get]
 Returns the NXOpen.PDM.PdmSearchManager instance belonging to this session More...
 
NXOpen.Validate.XmlComparator XmlComparator [get]
 Returns the NXOpen.Validate.XmlComparator instance belonging to this session More...
 
NXOpen.CAE.FTK.DataManager DataManager [get]
 Returns the NXOpen.CAE.FTK.DataManager belonging to this session More...
 
NXOpen.VisualReporting.VisualReportManager VisualReportManager [get]
 Returns the NXOpen.VisualReporting.VisualReportManager instance belonging to this session More...
 
NXOpen.CAE.Xyplot.XYPlotManager XYPlotManager [get]
 Returns the NXOpen.CAE.Xyplot.XYPlotManager belonging to this session More...
 
NXOpen.PDM.PdmSession PdmSession [get]
 Returns the NXOpen.PDM.PdmSession belonging to this session More...
 
NXOpen.Tooling.ToolingSession ToolingSession [get]
 Returns the NXOpen.Tooling.ToolingSession belonging to this session More...
 
NXOpen.Features.UserDefinedFeatureClassManager UserDefinedFeatureClassManager [get]
 Returns the NXOpen.Features.UserDefinedFeatureClassManager belonging to this session More...
 
NXOpen.Issue.IssueManager IssueManager [get]
 Returns the NXOpen.Issue.IssueManager belonging to this session More...
 
NXOpen.AttributeManager AttributeManager [get]
 Returns the NXOpen.AttributeManager belonging to this session More...
 
NXOpen.LinkedPartManager LinkedPartManager [get]
 Returns the NXOpen.LinkedPartManager belonging to this session More...
 
NXOpen.CollaborativeContentManager CollaborativeContentManager [get]
 Returns the NXOpen.CollaborativeContentManager belonging to this session More...
 
NXOpen.Mechatronics.MechatronicsSession MechatronicsSession [get]
 Returns the NXOpen.Mechatronics.MechatronicsSession belonging to this session More...
 
NXOpen.PDM.ConfigurationManager ConfigurationManager [get]
 Returns the NXOpen.PDM.ConfigurationManager belonging to this session More...
 
NXOpen.Gateway.BookmarkFile BookmarkFile [get]
 Returns the NXOpen.Gateway.BookmarkFile belonging to this session More...
 
NXOpen.SubdivisionTaskEnvironment SubdivisionTaskEnvironment [get]
 Returns the NXOpen.SubdivisionTaskEnvironment belonging to this session More...
 
NXOpen.Weld.WeldCpdUtils WeldCpdUtils [get]
 Returns the NXOpen.Weld.WeldCpdUtils instance belonging to this session More...
 
NXOpen.Features.CustomFeatureClassManager CustomFeatureClassManager [get]
 Returns the NXOpen.Features.CustomFeatureClassManager belonging to this session More...
 
NXOpen.SIM.PostConfigurator.PostConfiguratorManager PostConfiguratorManager [get]
 Returns the NXOpen.SIM.PostConfigurator.PostConfiguratorManager instance belonging to this session More...
 
NXOpen.JournalManager JournalManager [get]
 Returns the JournalManager instance belonging to this session More...
 
NXOpen.PDM.WebAppSession WebAppSession [get]
 Returns the NXOpen.PDM.WebAppSession belonging to this session More...
 
NXOpen.Report.ReportManager ReportManager [get]
 Returns the NXOpen.Report.ReportManager belonging to this session. More...
 
NXOpen.ShipDesign.ShipSession ShipSession [get]
 Returns the NXOpen.ShipDesign.ShipSession belonging to this session. More...
 
NXOpen.Diagramming.SheetManager SheetManager [get]
 Returns the SheetManager instance belonging to this session More...
 
NXOpen.PolygonModelingTaskEnvironment PolygonModelingTaskEnvironment [get]
 Returns the NXOpen.PolygonModelingTaskEnvironment belonging to this session More...
 
unsafe NXOpen.Sketch ActiveSketch [get]
 Returns the active sketch More...
 
unsafe string ApplicationName [get]
 Returns the name of the current application. More...
 
unsafe string ExecutingJournal [get]
 Returns the full path to the journal that is currently being executed More...
 
unsafe bool IsBatch [get]
 Returns true if and only if NX is batch mode (or in other words not running interactively). More...
 
unsafe bool IsInTaskEnvironment [get]
 Returns true if and only if NX is in a task environment More...
 
unsafe NXOpen.Session.UndoMarkId NewestVisibleUndoMark [get]
 Returns the newest visible undo mark More...
 
unsafe
NXOpen.Session.TransientPartPolicy 
TransientPartPersistencePolicy [get, set]
 Returns or sets the persistence policy for transient parts in the session More...
 

Detailed Description

Represents the NX session.

For language bindings that support remoting, the server must export it for this class to be obtained by a client.

Created in NX3.0.0

Member Enumeration Documentation

Describes when an automation library should be unloaded from a running session.

To use the enum, implement a static function called GetUnloadOption in your automation program which returns one of these options as an integer. (Note that this function must also have a string argument that is currently not used for anything.) NX will call this method once the automation program has exited to determine when to unload the library.

Enumerator
Immediately 

unload the library as soon as the automation program has completed

Explicitly 

unload the library from the "Unload Shared Image" dialog

AtTermination 

unload the library when the NX session terminates

Indicates the visibility of an undo mark

Enumerator
Visible 
Invisible 
AnyVisibility 

Use only in query methods

Indicates whether project assignment is for item, item revision or dataset

Enumerator
Part 

item

Partrev 

item rev

Appdata 

data set

CollaborativeProductDevelopmentDe 

Collaborative Product Development -Design Element

Indicates project assignment state

Enumerator
None 

to remove project from all objects

Partial 

to skip project assignment

Full 

to assign project to all objects

Persistence policies for transient modified parts

Enumerator
RetainTransience 

Retain transient status when non-retainable mods made

RemoveTransience 

Remove transient status when non-retainable mods made

Represents a undo mark.

This is used to rollback to previous states of the model.

Member Function Documentation

unsafe void NXOpen.Session.ApplicationSwitchImmediate ( string  applicationName)

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.

Created in NX10.0.0

License requirements: None.

Parameters
applicationNameButton name of requested application
unsafe void NXOpen.Session.AssignRemoveProjects ( string[]  cliNames,
NXOpen.Session.ProjectAssignmentObjectType[]  objectTypes,
string[]  projectNames,
NXOpen.Session.ProjectAssignmentState[]  assignmentStates 
)

Assign or remove projects to/from objects

Created in NX6.0.0

License requirements: None.

Parameters
cliNamescli names of the objects to assign projects to
objectTypesone of item, item rev or dataset type
projectNamesnames of the projects to assign
assignmentStatesassignment states
unsafe void NXOpen.Session.AssignRemoveProjectsBasedOnPartOccs ( NXOpen.TaggedObject[]  partOccs,
NXOpen.Session.ProjectAssignmentObjectType[]  objectTypes,
string[]  projectNames,
NXOpen.Session.ProjectAssignmentState[]  assignmentStates 
)

Assign or remove projects to/from CPD objects

Created in NX8.5.0

License requirements: None.

Parameters
partOccsArray of components to assign/remove projects to
objectTypescurrently only DE
projectNamesnames of the projects to assign
assignmentStatesassignment states
unsafe void NXOpen.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.

Created in NX3.0.0

License requirements: None.

unsafe void NXOpen.Session.CleanUpFacetedFacesAndEdges ( )

Deletes all NXOpen.Facet.FacetedFace and NXOpen.Facet.FacetedEdge objects in the current session

Created in NX5.0.0

License requirements: None.

unsafe void NXOpen.Session.CreateCamSession ( )

Create the CAM session

Created in NX4.0.0

License requirements: None.

unsafe void NXOpen.Session.CreateInspectionSession ( )

Create the Inspection session

Created in NX7.0.0

License requirements: None.

unsafe NXOpen.TableEditorDefaultDataProvider NXOpen.Session.CreateTableEditorDefaultDataProvider ( NXOpen.BasePart  part)

Creates a data provider for a table editor.

Created in NX10.0.0

License requirements: None.

Parameters
partThe part that owns the data provider. The owner is not strictly required (that is, it can be a null reference (Nothing in Visual Basic)), 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
unsafe void NXOpen.Session.DeleteAllUndoMarks ( )

Deletes all undo marks

Created in NX3.0.0

License requirements: None.

unsafe bool NXOpen.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.

Created in NX10.0.0

License requirements: None.

Returns
Indicates whether any transient data is deleted.
unsafe void NXOpen.Session.DeleteUndoMark ( NXOpen.Session.UndoMarkId  markId,
string  markName 
)

Deletes an undo mark.

If you want to delete a mark and all marks that were created after that mark, use DeleteUndoMarksUpToMark instead.

Created in NX3.0.0

License requirements: None.

Parameters
markIdID of mark
markNameName of mark. Used only if mark_id not found
unsafe void NXOpen.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.

Created in NX3.0.0

License requirements: None.

unsafe void NXOpen.Session.DeleteUndoMarksUpToMark ( NXOpen.Session.UndoMarkId  markId,
string  markName,
bool  deleteAllIfNotFound 
)

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.

Created in NX3.0.0

License requirements: None.

Parameters
markIdID of mark
markNameName of mark. Used only if mark_id not found
deleteAllIfNotFoundWhether to delete all marks if the specified mark is not found
unsafe bool NXOpen.Session.DoesUndoMarkExist ( NXOpen.Session.UndoMarkId  markId,
string  markName 
)

Returns true if the specified mark exists

Created in NX3.0.0

License requirements: None.

Parameters
markIdID of mark
markNameName of the mark. Used only if mark_id not found
Returns
True if and only if the mark exists
unsafe bool NXOpen.Session.EnableRedo ( bool  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.

Created in NX7.5.3

License requirements: None.

Parameters
enableRedoTrue will enable redo for NXOpen programs. False should disable the redo for NXOpen programs
Returns
Returns previous redo state
unsafe void NXOpen.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.

Created in NX3.0.0

License requirements: None.

unsafe Object NXOpen.Session.Execute ( string  libName,
string  className,
string  methodName,
Object[]  inputArgs 
)

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.

Created in NX5.0.0

License requirements: None.

Parameters
libNameName of the library containing the method. The full path to the library is required.
classNameName of the class
methodNameName of the method to invoke
inputArgsInput arguments for managed method
Returns
Return argument for managed method
unsafe Object [] NXOpen.Session.ExecuteGrip ( string  gripExecutable,
Object[]  inputArgs 
)

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.

Created in NX3.0.0

License requirements: grip_execute ("GRIP EXECUTE")

Parameters
gripExecutableName of Grip executable to run
inputArgsInput arguments for Grip subroutine
Returns
Output arguments for Grip subroutine
unsafe void NXOpen.Session.ExitPartNavigator ( )

Exits the part navigator

Created in NX10.0.0

License requirements: None.

unsafe void NXOpen.Session.FreezePartNavigator ( )

Freeze Part Navigator updates.

This can be used to improve performance when features or other objects are created repeatedly, for example when instantiating a User Defined Feature. Freezing Part Navigator updates prior to such operations avoids repeated Part Navigator updates. It is essentialy to unfreeze Part Navigator updates using NXOpen.Session.UnfreezePartNavigator subsequently to enable Part Navigator updates again.

Created in NX12.0.0

License requirements: None.

unsafe NXOpen.Session.UndoMarkData [] NXOpen.Session.GetAllUndoMarks ( NXOpen.Session.MarkVisibility  visibility)

Returns a list of all the undo marks with the specified visibility

Created in NX3.0.0

License requirements: None.

Parameters
visibilityUsed to limit the results to marks with the specified visibility
Returns
List of the undo marks
unsafe string [] NXOpen.Session.GetClasses ( )

Gets a list of the classes defined in the current session

Created in NX5.0.0

License requirements: None.

Returns
array of class names
unsafe string NXOpen.Session.GetEnvironmentVariableValue ( string  envVaribable)

Returns the value of a NX enviroment variable

Created in NX7.5.0

License requirements: None.

Parameters
envVaribablethe environment variable name, which may be case sensitive on some platforms
Returns
the value assigned to this environment variable
unsafe string [] NXOpen.Session.GetNamedProperties ( NXOpen.TaggedObject @  object)

Gets a list of the named properties of this object

Created in NX5.0.0

License requirements: None.

Parameters
objectThe object to query
Returns
array of property names
unsafe void NXOpen.Session.GetNamedProperties ( string  className,
out string[]  properties,
out string[]  propertyTypes 
)

Gets a list of the named properties of a named class

Created in NX5.0.0

License requirements: None.

Parameters
classNameThe name of the class to query
propertiesarray of property names
propertyTypestype name of corresponding property
unsafe NXOpen.Session.UndoMarkId NXOpen.Session.GetNewestUndoMark ( NXOpen.Session.MarkVisibility  visibility)

Returns the newest undo mark with the specified visibility

Created in NX3.0.0

License requirements: None.

Parameters
visibilitythe visibility mask
Returns
ID of the next undo mark. This will be zero if there are no undo marks
unsafe string NXOpen.Session.GetProperty ( NXOpen.TaggedObject @  object,
string  propertyName 
)

Gets a named property of the object.

The property names are based upon the properties provided by the NXOpen API.

Created in NX5.0.0

License requirements: None.

Parameters
objectThe object to query
propertyNameThe name of the property
Returns
The value of the property, expressed as a string
unsafe string NXOpen.Session.GetUndoMarkName ( NXOpen.Session.UndoMarkId  markId)

Returns the name of the specified undo mark

Created in NX3.0.0

License requirements: None.

Parameters
markIdID of the mark
Returns
the mark's name
unsafe NXOpen.Session.MarkVisibility NXOpen.Session.GetUndoMarkVisibility ( NXOpen.Session.UndoMarkId  markId,
string  markName 
)

Returns the visibility of the specified undo mark

Created in NX3.0.0

License requirements: None.

Parameters
markIdID of mark
markNameName of the mark. Used only if mark_id not found
Returns
visibility of the mark
unsafe bool NXOpen.Session.IsCamSessionInitialized ( )

Check if the CAM session is initialized

Created in NX4.0.0

License requirements: None.

Returns
unsafe bool NXOpen.Session.IsInspectionSessionInitialized ( )

Check if the Inspection session is initialized

Created in NX7.0.0

License requirements: None.

Returns
unsafe bool NXOpen.Session.IsPartNavigatorFrozen ( )

Check if the Part Navigator update is frozen

Created in NX12.0.0

License requirements: None.

Returns
true if Part Navigator update is frozen false if unfrozen.
unsafe bool NXOpen.Session.IsPartNavigatorOpen ( )

Check if the Part Navigator is open or close

Created in NX10.0.0

License requirements: None.

Returns
true if Part Navigator is open false if close
unsafe NXOpen.CAE.GRMSearch NXOpen.Session.NewCaeGrmsearch ( )

Creates a new CAE GRM Search object

Created in NX8.0.0

License requirements: None.

Returns
unsafe NXOpen.PDM.PersistentSettings NXOpen.Session.NewDatabasePersistentOptions ( )

Creates a new database persistent option controller

Created in NX4.0.0

License requirements: None.

Returns
unsafe NXOpen.PDM.SessionSettings NXOpen.Session.NewDatabaseSessionOptions ( )

Creates a new database session option controller

Created in NX4.0.0

License requirements: None.

Returns
unsafe NXOpen.ErrorList NXOpen.Session.NewErrorList ( )

Creates a new error list.

Warning: this method may be removed in a future release

Created in NX3.0.0

License requirements: None.

Returns
unsafe NXOpen.PartCleanup NXOpen.Session.NewPartCleanup ( )

Constructs a new PartCleanup object.

Created in NX3.0.0

License requirements: None.

Returns
unsafe NXOpen.Display.TransientText NXOpen.Session.NewTransientText ( )

Returns a new NXOpen.Display.TransientText object

Created in NX8.0.0

License requirements: None.

Returns
unsafe void NXOpen.Session.OpenPartNavigator ( )

Opens the part navigator

Created in NX10.0.0

License requirements: None.

unsafe void NXOpen.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.

Created in NX5.0.0

License requirements: None.

unsafe void NXOpen.Session.SetEnvironmentVariableValue ( string  envVaribable,
string  envValue 
)

Sets the value of a NX enviroment variable

Created in NX7.5.1

License requirements: None.

Parameters
envVaribablethe environment variable name, which may be case sensitive on some platforms
envValuethe value to be assigned to this environment variable
unsafe void NXOpen.Session.SetProperty ( NXOpen.TaggedObject @  object,
string  propertyName,
string  value 
)

Sets a named property of the object.

The property names are based upon the properties provided by the NXOpen API.

Created in NX5.0.0

License requirements: None.

Parameters
objectThe object to query
propertyNameThe name of the property
valueThe value of the property, expressed as a string
unsafe NXOpen.Session.UndoMarkId NXOpen.Session.SetUndoMark ( NXOpen.Session.MarkVisibility  markVisibility,
string  name 
)

Creates an undo mark

Created in NX3.0.0

License requirements: None.

Parameters
markVisibility
namemark name
Returns
mark ID
unsafe void NXOpen.Session.SetUndoMarkName ( NXOpen.Session.UndoMarkId  markId,
string  markName 
)

Sets the name of the undo mark

Created in NX3.0.0

License requirements: None.

Parameters
markIdID of the mark
markNameName of the mark.
unsafe void NXOpen.Session.SetUndoMarkVisibility ( NXOpen.Session.UndoMarkId  markId,
string  markName,
NXOpen.Session.MarkVisibility  visibility 
)

Sets the visibility of the specified undo mark

Created in NX3.0.0

License requirements: None.

Parameters
markIdID of mark
markNameName of the mark. Used only if mark_id not found
visibilitythe new visibility
unsafe void NXOpen.Session.UndoLastNVisibleMarks ( int  n,
out bool  marksRecycled,
out bool  undoUnavailable 
)

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.

Created in NX3.0.0

License requirements: None.

Parameters
nNumber of visible marks to undo
marksRecycledTrue if undo succeeded but no marks remain. This may indicate previous marks have been recycled.
undoUnavailableTrue if not all requested marks were undone and the application has locked the undo system.
unsafe void NXOpen.Session.UndoToLastVisibleMark ( )

Undo to last visible mark.

This will not delete the undo mark. Use UndoLastNVisibleMarks to delete the undo mark also.

Created in NX3.0.0

License requirements: None.

unsafe void NXOpen.Session.UndoToMark ( NXOpen.Session.UndoMarkId  markId,
string  markName 
)

Undo to the specified mark

Created in NX3.0.0

License requirements: None.

Parameters
markIdID of mark to undo to
markNameName of mark to undo to. Used only if mark_id not found
unsafe void NXOpen.Session.UndoToMarkWithStatus ( NXOpen.Session.UndoMarkId  markId,
string  markName 
)

Undo to the specified mark and output status to status bar.

Created in NX3.0.0

License requirements: None.

Parameters
markIdID of mark to undo to
markNameName of mark to undo to. Used only if mark_id not found
unsafe void NXOpen.Session.UnfreezePartNavigator ( )

Unfreeze Part Navigator updates.

It is essential to unfreeze Part Navigator updates after a call to NXOpen.Session.FreezePartNavigator . This should be followed by a call to NXOpen.Update.DoUpdate .

Created in NX12.0.0

License requirements: None.

Property Documentation

unsafe NXOpen.Sketch NXOpen.Session.ActiveSketch
get

Returns the active sketch

Created in NX3.0.0

License requirements: None.

NXOpen.CAE.AfuManager NXOpen.Session.AfuManager
get

Returns the NXOpen.CAE.AfuManager belonging to this session

Created in NX3.0.0

unsafe string NXOpen.Session.ApplicationName
get

Returns the name of the current application.

Created in NX10.0.0

License requirements: None.

NXOpen.AssembliesUtils NXOpen.Session.AssembliesUtils
get

Returns the NXOpen.AssembliesUtils instance belonging to this session

Created in NX3.0.0

NXOpen.AttributeManager NXOpen.Session.AttributeManager
get

Returns the NXOpen.AttributeManager belonging to this session

Created in NX8.5.0

NXOpen.Gateway.BookmarkFile NXOpen.Session.BookmarkFile
get

Returns the NXOpen.Gateway.BookmarkFile belonging to this session

Created in NX10.0.0

NXOpen.CAE.CaeSession NXOpen.Session.CaeSession
get

Returns the NXOpen.CAE.CaeSession belonging to this session

Created in NX7.5.0

NXOpen.CAM.CAMSession NXOpen.Session.CAMSession
get

Returns the CAM session

Created in NX3.0.0

NXOpen.CollaborativeContentManager NXOpen.Session.CollaborativeContentManager
get

Returns the NXOpen.CollaborativeContentManager belonging to this session

Created in NX8.5.0

NXOpen.PDM.ConfigurationManager NXOpen.Session.ConfigurationManager
get

Returns the NXOpen.PDM.ConfigurationManager belonging to this session

Created in NX9.0.0

NXOpen.Features.CustomFeatureClassManager NXOpen.Session.CustomFeatureClassManager
get

Returns the NXOpen.Features.CustomFeatureClassManager belonging to this session

Created in NX11.0.0

NXOpen.CAE.FTK.DataManager NXOpen.Session.DataManager
get

Returns the NXOpen.CAE.FTK.DataManager belonging to this session

Created in NX7.5.0

NXOpen.Routing.DesignRuleManager NXOpen.Session.DesignRuleManager
get

Returns the NXOpen.Routing.DesignRuleManager .

Created in NX3.0.0

NXOpen.DexManager NXOpen.Session.DexManager
get

Returns the NXOpen.DexManager belonging to this session

Created in NX3.0.0

NXOpen.DisplayManager NXOpen.Session.DisplayManager
get

Returns the NXOpen.DisplayManager belonging to this session

Created in NX3.0.0

NXOpen.DrawingUtils NXOpen.Session.DrawingUtils
get

Returns the NXOpen.DrawingUtils instance belonging to this session

Created in NX8.5.3

NXOpen.EngineeringFunction NXOpen.Session.EngineeringFunction
get

Returns the NXOpen.EngineeringFunction instance belonging to this session

Created in NX3.0.0

unsafe string NXOpen.Session.ExecutingJournal
get

Returns the full path to the journal that is currently being executed

Created in NX3.0.0

License requirements: None.

NXOpen.CAE.FTK.FTKManager NXOpen.Session.FTKManager
get

Returns the NXOpen.CAE.FTK.FTKManager belonging to this session

Created in NX3.0.0

NXOpen.Information NXOpen.Session.Information
get

Returns the NXOpen.Information instance belonging to this session

Created in NX3.0.0

unsafe bool NXOpen.Session.IsBatch
get

Returns true if and only if NX is batch mode (or in other words not running interactively).

Created in NX8.0.3

License requirements: None.

unsafe bool NXOpen.Session.IsInTaskEnvironment
get

Returns true if and only if NX is in a task environment

Created in NX3.0.0

License requirements: None.

NXOpen.Issue.IssueManager NXOpen.Session.IssueManager
get

Returns the NXOpen.Issue.IssueManager belonging to this session

Created in NX8.5.0

NXOpen.JournalManager NXOpen.Session.JournalManager
get

Returns the JournalManager instance belonging to this session

Created in NX11.0.0

NXOpen.LicenseManager NXOpen.Session.LicenseManager
get

Returns the NXOpen.LicenseManager belonging to this session

Created in NX3.0.0

NXOpen.LinkedPartManager NXOpen.Session.LinkedPartManager
get

Returns the NXOpen.LinkedPartManager belonging to this session

Created in NX8.5.0

NXOpen.ListingWindow NXOpen.Session.ListingWindow
get

Returns the NXOpen.ListingWindow belonging to this session

Created in NX3.0.0

NXOpen.LogFile NXOpen.Session.LogFile
get

Returns the log file instance for this session

Created in NX3.0.0

NXOpen.MathUtils NXOpen.Session.MathUtils
get

Returns the NXOpen.MathUtils instance belonging to this session

Created in NX3.0.0

NXOpen.Measurement NXOpen.Session.Measurement
get

Returns the NXOpen.Measurement instance belonging to this session

Created in NX3.0.0

NXOpen.Mechatronics.MechatronicsSession NXOpen.Session.MechatronicsSession
get

Returns the NXOpen.Mechatronics.MechatronicsSession belonging to this session

Created in NX9.0.0

NXOpen.Motion.MotionSession NXOpen.Session.MotionSession
get

Returns the Motion session

Created in NX3.0.0

NXOpen.Motion.MotionSimulation NXOpen.Session.MotionSimulation
get

Returns the Motion session

Created in NX3.0.0

unsafe NXOpen.Session.UndoMarkId NXOpen.Session.NewestVisibleUndoMark
get

Returns the newest visible undo mark

Created in NX3.0.0

License requirements: None.

NXOpen.Options.OptionsManager NXOpen.Session.OptionsManager
get

Returns the NXOpen.Options.OptionsManager instance belonging to this session

Created in NX3.0.0

NXOpen.PartCollection NXOpen.Session.Parts
get

Returns the NXOpen.PartCollection belonging to this session

Created in NX3.0.0

NXOpen.PDM.PdmSearchManager NXOpen.Session.PdmSearchManager
get

Returns the NXOpen.PDM.PdmSearchManager instance belonging to this session

Created in NX3.0.0

NXOpen.PDM.PdmSession NXOpen.Session.PdmSession
get

Returns the NXOpen.PDM.PdmSession belonging to this session

Created in NX7.5.0

NXOpen.PolygonModelingTaskEnvironment NXOpen.Session.PolygonModelingTaskEnvironment
get

Returns the NXOpen.PolygonModelingTaskEnvironment belonging to this session

Created in NX12.0.0

NXOpen.CAE.Post NXOpen.Session.Post
get

Returns the NXOpen.CAE.Post belonging to this session

Created in NX3.0.0

NXOpen.SIM.PostConfigurator.PostConfiguratorManager NXOpen.Session.PostConfiguratorManager
get

Returns the NXOpen.SIM.PostConfigurator.PostConfiguratorManager instance belonging to this session

Created in NX10.0.3

NXOpen.Preferences.SessionPreferences NXOpen.Session.Preferences
get

Returns the preferences instance for the session

Created in NX3.0.0

NXOpen.PvtransManager NXOpen.Session.PvtransManager
get

Returns the NXOpen.PvtransManager belonging to this session

Created in NX8.5.0

NXOpen.Report.ReportManager NXOpen.Session.ReportManager
get

Returns the NXOpen.Report.ReportManager belonging to this session.

Created in NX11.0.0

NXOpen.PDM.RequirementUtils NXOpen.Session.RequirementUtils
get

Returns the NXOpen.PDM.RequirementUtils instance belonging to this session

Created in NX6.0.3

NXOpen.CAE.ResultManager NXOpen.Session.ResultManager
get

Returns the NXOpen.CAE.ResultManager belonging to this session

Created in NX6.0.2

NXOpen.Routing.CustomManager NXOpen.Session.RouteCustomManager
get

Returns the NXOpen.Routing.CustomManager for this session.

Created in NX12.0.0

NXOpen.Diagramming.SheetManager NXOpen.Session.SheetManager
get

Returns the SheetManager instance belonging to this session

Created in NX12.0.0

NXOpen.ShipDesign.ShipSession NXOpen.Session.ShipSession
get

Returns the NXOpen.ShipDesign.ShipSession belonging to this session.

Created in NX11.0.0

NXOpen.SpreadsheetManager NXOpen.Session.SpreadsheetManager
get

Returns the NXOpen.SpreadsheetManager belonging to this session

Created in NX11.0.0

NXOpen.SubdivisionTaskEnvironment NXOpen.Session.SubdivisionTaskEnvironment
get

Returns the NXOpen.SubdivisionTaskEnvironment belonging to this session

Created in NX9.0.0

NXOpen.Tooling.ToolingSession NXOpen.Session.ToolingSession
get

Returns the NXOpen.Tooling.ToolingSession belonging to this session

Created in NX8.0.0

unsafe NXOpen.Session.TransientPartPolicy NXOpen.Session.TransientPartPersistencePolicy
getset

Returns or sets the persistence policy for transient parts in the session

Created in NX4.0.0

License requirements to get this property: None.

License requirements to set this property: None.

NXOpen.Update NXOpen.Session.UpdateManager
get

Returns the NXOpen.Update belonging to this session

Created in NX3.0.0

NXOpen.UserDefinedObjects.UserDefinedClassManager NXOpen.Session.UserDefinedClassManager
get

Returns the NXOpen.UserDefinedObjects.UserDefinedClassManager belonging to this session

Created in NX3.0.0

NXOpen.Features.UserDefinedFeatureClassManager NXOpen.Session.UserDefinedFeatureClassManager
get

Returns the NXOpen.Features.UserDefinedFeatureClassManager belonging to this session

Created in NX8.0.0

NXOpen.Validate.ValidationManager NXOpen.Session.ValidationManager
get

Returns the NXOpen.Validate.ValidationManager belonging to this session

Created in NX7.5.0

NXOpen.VisualReporting.VisualReportManager NXOpen.Session.VisualReportManager
get

Returns the NXOpen.VisualReporting.VisualReportManager instance belonging to this session

Created in NX7.0.0

NXOpen.PDM.WebAppSession NXOpen.Session.WebAppSession
get

Returns the NXOpen.PDM.WebAppSession belonging to this session

Created in NX11.0.0

NXOpen.Weld.WeldCpdUtils NXOpen.Session.WeldCpdUtils
get

Returns the NXOpen.Weld.WeldCpdUtils instance belonging to this session

Created in NX9.0.0

NXOpen.Weld.CustomManager NXOpen.Session.WeldCustomManager
get

Returns the NXOpen.Weld.CustomManager belonging to this session

Created in NX8.0.0

NXOpen.Validate.XmlComparator NXOpen.Session.XmlComparator
get

Returns the NXOpen.Validate.XmlComparator instance belonging to this session

Created in NX6.0.2

NXOpen.CAE.Xyplot.XYPlotManager NXOpen.Session.XYPlotManager
get

Returns the NXOpen.CAE.Xyplot.XYPlotManager belonging to this session

Created in NX7.5.0


The documentation for this class was generated from the following file:
Copyright 2017 Siemens Product Lifecycle Management Software Inc. All Rights Reserved.