ToolingSession Class¶
-
class
NXOpen.Tooling.ToolingSession¶ Bases:
objectRepresents Tooling session
To obtain an instance of this class, refer to
NXOpen.SessionNew in version NX8.0.0.
Methods¶
| Method | Description |
|---|---|
| ClosePart | Close an existing part |
| CreateCloneObject | Creates the clone operation object |
| CreateComponentPattern | Create component pattern |
| CreateSpreadsheetData | Creates an instance of class NXOpen.Tooling.SpreadsheetData. |
| GetReusableComponent | Gets the reusable component |
| GetReusableObjects | Gets the last added reusable object |
| LoadReusablePart | Opens an existing part, but does not set it to be the displayed part. |
| SetWizardType | Sets the wizard type of tooling application. |
Method Detail¶
ClosePart¶
-
ToolingSession.ClosePart¶ Close an existing part
Signature
ClosePart(part, wholeTree, closeModified)Parameters: - part (
NXOpen.NXObject) – Tag of the part that will be closed - wholeTree (
NXOpen.BasePartCloseWholeTree) – If true, unloads all components of the part. If false, unloads only the top-level part - closeModified (
NXOpen.BasePartCloseModified) – Behavior of close if component parts are modified.
New in version NX9.0.2.
License requirements: None.
- part (
CreateCloneObject¶
-
ToolingSession.CreateCloneObject¶ Creates the clone operation object
Signature
CreateCloneObject(applicationType, cloneActionType)Parameters: - applicationType (
NXOpen.Tooling.ToolingApplication) – Application type to determine the clone settings - cloneActionType (
NXOpen.Tooling.ToolingCloneaction) – Clone action type
Returns: the new
NXOpen.Tooling.CloneObjectinstanceReturn type: New in version NX8.0.0.
License requirements: None.
- applicationType (
CreateComponentPattern¶
-
ToolingSession.CreateComponentPattern¶ Create component pattern
Signature
CreateComponentPattern(component, targetEntity)Parameters: - component (
NXOpen.NXObject) – - targetEntity (
NXOpen.NXObject) –
New in version NX11.0.2.
License requirements: None.
- component (
CreateSpreadsheetData¶
-
ToolingSession.CreateSpreadsheetData¶ Creates an instance of class
NXOpen.Tooling.SpreadsheetData.Please note this method will only create an empty class
NXOpen.Tooling.SpreadsheetDataobject, it needs to call other methodNXOpen.Tooling.SpreadsheetData.ReadData()to retrieve the data.Signature
CreateSpreadsheetData()Returns: the new NXOpen.Tooling.SpreadsheetDatainstanceReturn type: NXOpen.Tooling.SpreadsheetDataNew in version NX8.0.0.
License requirements: None.
GetReusableComponent¶
-
ToolingSession.GetReusableComponent¶ Gets the reusable component
Signature
GetReusableComponent()Returns: The array of reuseable components Return type: list of NXOpen.Assemblies.ComponentNew in version NX9.0.0.
License requirements: None.
GetReusableObjects¶
-
ToolingSession.GetReusableObjects¶ Gets the last added reusable object
Signature
GetReusableObjects(part)Parameters: part ( NXOpen.NXObject) – Tag of the part that contains reusable objectsReturns: Objects, mainly bodies, from the input part Return type: list of NXOpen.NXObjectNew in version NX10.0.0.
License requirements: None.
LoadReusablePart¶
-
ToolingSession.LoadReusablePart¶ Opens an existing part, but does not set it to be the displayed part.
Signature
LoadReusablePart(filename, isNativePart)Parameters: - filename (str) – Name of part file
- isNativePart (bool) – Is the file from native or TC
Returns: Part Tag
Return type: New in version NX9.0.1.
License requirements: None.