SpreadsheetData Class¶
-
class
NXOpen.Tooling.
SpreadsheetData
¶ Bases:
NXOpen.TransientObject
Represents the spreadsheet data which could be standalone spreadsheet file with special format or be the spreadsheet data from part family template part, the latter format will not have any other data except the name and value in class
NXOpen.Tooling.SpreadsheetDataParameter
, that means it might not return any result in some methods such as “GetDefinedAttributesExpressions”.About the standalone file format, it can refer to the sections below in NX Help: CAD->Shipbuilding->Installing templates and customizing the Ship Structure applications->Customizing the ship steel feature library->Steel feature parameter spreadsheet format CAD->Shipbuilding->Installing templates and customizing the Ship Structure applications->Customizing the standard parts library->Standard parts spreadsheet symbols
or the example files as below: $UGII_BASE_DIR/NXPARTS/Reuse Library/Reusable Object Library/Metric/Boss/Cross_Boss_01.xlsx $UGII_BASE_DIR/NXPARTS/Reuse Library/Reuse Examples/Standard Parts/DIN/Profile/Pipe-Tube/Cold-worked Welded Rect Steel Tube, DIN.xls
To create an instance of this class, call the method
NXOpen.Tooling.ToolingSession.CreateSpreadsheetData()
.New in version NX8.0.0.
Methods¶
Method | Description |
---|---|
AddAssociatedObject | Add object to be updated according to the spreadsheet data |
Close | Close the spreadsheet and exit excel App |
Dispose | Dispose the spreadsheet object |
EditParameter | Modify the spreadsheet parameter. |
GetDefinedAttributesExpressions | Get the object, part attributes or expressions defined in spreadsheet |
GetParameterValue | Get the parameters with current select/input value |
GetParameterValueList | Get the list of values by giving a parameter name in spreadsheet |
ReadData | Load the data from given spreadsheet file |
SearchRecords | Search the spreadsheet by the given conditions. |
SelectPrimaryParameter | Change the primary parameter of the spreadsheet |
SetParameterStatus | Sets the Lock/Hide or other status of spreadsheet parameter. |
Update | Update the associated objects according to the spreadsheet data |
UpdateModel | Update the associated objects according to the spreadsheet data with the options |
Enumerations¶
SpreadsheetDataKeywordType Enumeration | Represents the different attribute or expression section in spreadsheet |
SpreadsheetDataParameterStatus Enumeration | Represents the different spreadsheet parameter status |
Method Detail¶
AddAssociatedObject¶
-
SpreadsheetData.
AddAssociatedObject
¶ Add object to be updated according to the spreadsheet data
Signature
AddAssociatedObject(associatedObject)
Parameters: associatedObject ( NXOpen.NXObject
) – the object to be updated according to the spreadsheet dataNew in version NX8.0.0.
License requirements: None.
Close¶
-
SpreadsheetData.
Close
¶ Close the spreadsheet and exit excel App
Signature
Close()
New in version NX8.0.1.
License requirements: None.
Dispose¶
-
SpreadsheetData.
Dispose
¶ Dispose the spreadsheet object
Signature
Dispose()
New in version NX8.0.0.
License requirements: None.
EditParameter¶
-
SpreadsheetData.
EditParameter
¶ Modify the spreadsheet parameter.
Signature
EditParameter(parameterName, parameterValue)
Parameters: - parameterName (str) – the parameter name
- parameterValue (str) – the parameter value
New in version NX8.0.0.
License requirements: None.
GetDefinedAttributesExpressions¶
-
SpreadsheetData.
GetDefinedAttributesExpressions
¶ Get the object, part attributes or expressions defined in spreadsheet
Signature
GetDefinedAttributesExpressions(keywordType)
Parameters: keywordType ( NXOpen.Tooling.SpreadsheetDataKeywordType
) –Returns: a tuple Return type: A tuple consisting of (objOrPartAttrNames, attrNames, attrValues) objOrPartAttrNames is a list of str. Object name or part attribute to find part attrNames is a list of str. attrValues is a list of str. Array of structures with the object attributes data. New in version NX8.0.0.
License requirements: None.
GetParameterValue¶
-
SpreadsheetData.
GetParameterValue
¶ Get the parameters with current select/input value
Signature
GetParameterValue()
Returns: Array of structures with the parameter data. Return type: list of NXOpen.Tooling.SpreadsheetDataParameter
New in version NX8.0.0.
License requirements: None.
GetParameterValueList¶
-
SpreadsheetData.
GetParameterValueList
¶ Get the list of values by giving a parameter name in spreadsheet
Signature
GetParameterValueList(parameterName)
Parameters: parameterName (str) – Returns: The list of values Return type: list of str New in version NX10.0.0.
License requirements: None.
ReadData¶
-
SpreadsheetData.
ReadData
¶ Overloaded method ReadData
ReadData(spreadsheetFileName)
ReadData(familyPart)
-------------------------------------
Load the data from given spreadsheet file
Signature
ReadData(spreadsheetFileName)
Parameters: spreadsheetFileName (str) – Spreadsheet file name, give CLI name in NX/Manager environment New in version NX8.0.0.
License requirements: None.
-------------------------------------
Load the data from part family part
Signature
ReadData(familyPart)
Parameters: familyPart ( NXOpen.NXObject
) – the part family partNew in version NX8.0.0.
License requirements: None.
-------------------------------------
SearchRecords¶
-
SpreadsheetData.
SearchRecords
¶ Search the spreadsheet by the given conditions.
Signature
SearchRecords(searchConditions)
Parameters: searchConditions (str) – the search conditions New in version NX8.0.0.
License requirements: None.
SelectPrimaryParameter¶
-
SpreadsheetData.
SelectPrimaryParameter
¶ Change the primary parameter of the spreadsheet
Signature
SelectPrimaryParameter(parameterName, parameterValue)
Parameters: - parameterName (str) – the parameter name
- parameterValue (str) – the parameter value
New in version NX8.0.0.
License requirements: None.
SetParameterStatus¶
-
SpreadsheetData.
SetParameterStatus
¶ Sets the Lock/Hide or other status of spreadsheet parameter.
Signature
SetParameterStatus(parameterName, parameterStatus, isAdd)
Parameters: - parameterName (str) – the parameter name
- parameterStatus (int) – the parameter status as defined in
SpreadsheetDataParameterStatus
. - isAdd (bool) – Specifies whether the parameter status should be added or removed. If true, then the status is added, else it is removed.
New in version NX8.0.1.
License requirements: None.
Update¶
-
SpreadsheetData.
Update
¶ Update the associated objects according to the spreadsheet data
Signature
Update()
New in version NX8.0.0.
License requirements: None.
UpdateModel¶
-
SpreadsheetData.
UpdateModel
¶ Update the associated objects according to the spreadsheet data with the options
Signature
UpdateModel(doUpdateImmediately, updatePartAttribute)
Parameters: - doUpdateImmediately (bool) – Specifies whether to perform an update immediately.
- updatePartAttribute (bool) – Specifies whether part attributes should be updated.
New in version NX9.0.3.
License requirements: None.