NX Open C++ Reference Guide
Public Types | Public Member Functions | List of all members
NXOpen::Tooling::SpreadsheetData Class Reference

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". More...

Inheritance diagram for NXOpen::Tooling::SpreadsheetData:
NXOpen::TransientObject

Public Types

enum  KeywordType { KeywordTypeObjectAttribute = 1, KeywordTypePartAttribute, KeywordTypeExpression = 4 }
 Represents the different attribute or expression section in spreadsheet. More...
 
enum  ParameterStatus {
  ParameterStatusLock = 1, ParameterStatusSystemKey, ParameterStatusUserKey = 4, ParameterStatusHideStatus = 8,
  ParameterStatusScaleItem = 16, ParameterStatusReadOnly = 32, ParameterStatusModified = 64, ParameterStatusForceColor = 128,
  ParameterStatusHiddenValue = 256, ParameterStatusOptionValue = 512
}
 Represents the different spreadsheet parameter status. More...
 

Public Member Functions

void AddAssociatedObject (NXOpen::NXObject *associatedObject)
 Add object to be updated according to the spreadsheet data
Created in NX8.0.0. More...
 
void Close ()
 Close the spreadsheet and exit excel App
Created in NX8.0.1. More...
 
void EditParameter (const NXString &parameterName, const NXString &parameterValue)
 Modify the spreadsheet parameter. More...
 
void EditParameter (const char *parameterName, const char *parameterValue)
 Modify the spreadsheet parameter. More...
 
void GetDefinedAttributesExpressions (NXOpen::Tooling::SpreadsheetData::KeywordType keywordType, std::vector< NXString > &objOrPartAttrNames, std::vector< NXString > &attrNames, std::vector< NXString > &attrValues)
 Get the object, part attributes or expressions defined in spreadsheet
Created in NX8.0.0. More...
 
void GetParameterValue (std::vector< NXOpen::Tooling::SpreadsheetDataParameter * > &parameters)
 Get the parameters with current select/input value
Created in NX8.0.0. More...
 
void GetParameterValueList (const NXString &parameterName, std::vector< NXString > &paraValues)
 Get the list of values by giving a parameter name in spreadsheet
Created in NX10.0.0. More...
 
void GetParameterValueList (const char *parameterName, std::vector< NXString > &paraValues)
 Get the list of values by giving a parameter name in spreadsheet
Created in NX10.0.0. More...
 
void ReadData (const NXString &spreadsheetFileName)
 Load the data from given spreadsheet file
Created in NX8.0.0. More...
 
void ReadData (const char *spreadsheetFileName)
 Load the data from given spreadsheet file
Created in NX8.0.0. More...
 
void ReadData (NXOpen::NXObject *familyPart)
 Load the data from part family part
Created in NX8.0.0. More...
 
void SearchRecords (const NXString &searchConditions)
 Search the spreadsheet by the given conditions. More...
 
void SearchRecords (const char *searchConditions)
 Search the spreadsheet by the given conditions. More...
 
void SelectPrimaryParameter (const NXString &parameterName, const NXString &parameterValue)
 Change the primary parameter of the spreadsheet
Created in NX8.0.0. More...
 
void SelectPrimaryParameter (const char *parameterName, const char *parameterValue)
 Change the primary parameter of the spreadsheet
Created in NX8.0.0. More...
 
void SetParameterStatus (const NXString &parameterName, int parameterStatus, bool isAdd)
 Sets the Lock/Hide or other status of spreadsheet parameter. More...
 
void SetParameterStatus (const char *parameterName, int parameterStatus, bool isAdd)
 Sets the Lock/Hide or other status of spreadsheet parameter. More...
 
void Update ()
 Update the associated objects according to the spreadsheet data
Created in NX8.0.0. More...
 
void UpdateModel (bool doUpdateImmediately, bool updatePartAttribute)
 Update the associated objects according to the spreadsheet data with the options
Created in NX9.0.3. More...
 
virtual ~SpreadsheetData ()
 Dispose the spreadsheet object
Created in NX8.0.0. More...
 
- Public Member Functions inherited from NXOpen::TransientObject
void * GetHandle ()
 Handle of the internal object represented by this object. More...
 

Detailed Description

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 .


Created in NX8.0.0.

Member Enumeration Documentation

Represents the different attribute or expression section in spreadsheet.

Enumerator
KeywordTypeObjectAttribute 

Object attribute defined in spreadsheet.

KeywordTypePartAttribute 

Part attribute defined in spreadsheet.

KeywordTypeExpression 

Expression defined in spreadsheet.

Represents the different spreadsheet parameter status.

Enumerator
ParameterStatusLock 

User can't change the value in UI.

ParameterStatusSystemKey 

This is system key parameter.

ParameterStatusUserKey 

Key parameter analyzed from spreadsheet search.

ParameterStatusHideStatus 

Not shown in UI.

ParameterStatusScaleItem 

This is a scale item.

ParameterStatusReadOnly 

This parameter is read only.

ParameterStatusModified 

The parameter value is changed.

ParameterStatusForceColor 

If the parameter uses user value, normally it shows in UI in a different color.

If this status is set, the parameter value will be shown in the same color.

ParameterStatusHiddenValue 

The parameter has value, but it should be hidden to user.

ParameterStatusOptionValue 

The parameter has multiple value, but not treated as key parameter.

Constructor & Destructor Documentation

virtual NXOpen::Tooling::SpreadsheetData::~SpreadsheetData ( )
virtual

Dispose the spreadsheet object
Created in NX8.0.0.



License requirements : None

Member Function Documentation

void NXOpen::Tooling::SpreadsheetData::AddAssociatedObject ( NXOpen::NXObject associatedObject)

Add object to be updated according to the spreadsheet data
Created in NX8.0.0.



License requirements : None

Parameters
associatedObjectthe object to be updated according to the spreadsheet data
void NXOpen::Tooling::SpreadsheetData::Close ( )

Close the spreadsheet and exit excel App
Created in NX8.0.1.



License requirements : None

void NXOpen::Tooling::SpreadsheetData::EditParameter ( const NXString parameterName,
const NXString parameterValue 
)

Modify the spreadsheet parameter.


Created in NX8.0.0.

License requirements : None

Parameters
parameterNamethe parameter name
parameterValuethe parameter value
void NXOpen::Tooling::SpreadsheetData::EditParameter ( const char *  parameterName,
const char *  parameterValue 
)

Modify the spreadsheet parameter.


Created in NX8.0.0.

License requirements : None

Parameters
parameterNamethe parameter name
parameterValuethe parameter value
void NXOpen::Tooling::SpreadsheetData::GetDefinedAttributesExpressions ( NXOpen::Tooling::SpreadsheetData::KeywordType  keywordType,
std::vector< NXString > &  objOrPartAttrNames,
std::vector< NXString > &  attrNames,
std::vector< NXString > &  attrValues 
)

Get the object, part attributes or expressions defined in spreadsheet
Created in NX8.0.0.



License requirements : None

Parameters
keywordTypekeywordtype
objOrPartAttrNamesObject name or part attribute to find part
attrNamesattrnames
attrValuesArray of structures with the object attributes data.
void NXOpen::Tooling::SpreadsheetData::GetParameterValue ( std::vector< NXOpen::Tooling::SpreadsheetDataParameter * > &  parameters)

Get the parameters with current select/input value
Created in NX8.0.0.



License requirements : None

Parameters
parametersArray of structures with the parameter data.
void NXOpen::Tooling::SpreadsheetData::GetParameterValueList ( const NXString parameterName,
std::vector< NXString > &  paraValues 
)

Get the list of values by giving a parameter name in spreadsheet
Created in NX10.0.0.



License requirements : None

Parameters
parameterNameparametername
paraValuesThe list of values
void NXOpen::Tooling::SpreadsheetData::GetParameterValueList ( const char *  parameterName,
std::vector< NXString > &  paraValues 
)

Get the list of values by giving a parameter name in spreadsheet
Created in NX10.0.0.



License requirements : None

Parameters
parameterNameparametername
paraValuesThe list of values
void NXOpen::Tooling::SpreadsheetData::ReadData ( const NXString spreadsheetFileName)

Load the data from given spreadsheet file
Created in NX8.0.0.



License requirements : None

Parameters
spreadsheetFileNameSpreadsheet file name, give CLI name in NX/Manager environment
void NXOpen::Tooling::SpreadsheetData::ReadData ( const char *  spreadsheetFileName)

Load the data from given spreadsheet file
Created in NX8.0.0.



License requirements : None

Parameters
spreadsheetFileNameSpreadsheet file name, give CLI name in NX/Manager environment
void NXOpen::Tooling::SpreadsheetData::ReadData ( NXOpen::NXObject familyPart)

Load the data from part family part
Created in NX8.0.0.



License requirements : None

Parameters
familyPartthe part family part
void NXOpen::Tooling::SpreadsheetData::SearchRecords ( const NXString searchConditions)

Search the spreadsheet by the given conditions.


Created in NX8.0.0.

License requirements : None

Parameters
searchConditionsthe search conditions
void NXOpen::Tooling::SpreadsheetData::SearchRecords ( const char *  searchConditions)

Search the spreadsheet by the given conditions.


Created in NX8.0.0.

License requirements : None

Parameters
searchConditionsthe search conditions
void NXOpen::Tooling::SpreadsheetData::SelectPrimaryParameter ( const NXString parameterName,
const NXString parameterValue 
)

Change the primary parameter of the spreadsheet
Created in NX8.0.0.



License requirements : None

Parameters
parameterNamethe parameter name
parameterValuethe parameter value
void NXOpen::Tooling::SpreadsheetData::SelectPrimaryParameter ( const char *  parameterName,
const char *  parameterValue 
)

Change the primary parameter of the spreadsheet
Created in NX8.0.0.



License requirements : None

Parameters
parameterNamethe parameter name
parameterValuethe parameter value
void NXOpen::Tooling::SpreadsheetData::SetParameterStatus ( const NXString parameterName,
int  parameterStatus,
bool  isAdd 
)

Sets the Lock/Hide or other status of spreadsheet parameter.


Created in NX8.0.1.

License requirements : None

Parameters
parameterNamethe parameter name
parameterStatusthe parameter status as defined in SpreadsheetData::ParameterStatus .
isAddSpecifies whether the parameter status should be added or removed. If true, then the status is added, else it is removed.
void NXOpen::Tooling::SpreadsheetData::SetParameterStatus ( const char *  parameterName,
int  parameterStatus,
bool  isAdd 
)

Sets the Lock/Hide or other status of spreadsheet parameter.


Created in NX8.0.1.

License requirements : None

Parameters
parameterNamethe parameter name
parameterStatusthe parameter status as defined in SpreadsheetData::ParameterStatus .
isAddSpecifies whether the parameter status should be added or removed. If true, then the status is added, else it is removed.
void NXOpen::Tooling::SpreadsheetData::Update ( )

Update the associated objects according to the spreadsheet data
Created in NX8.0.0.



License requirements : None

void NXOpen::Tooling::SpreadsheetData::UpdateModel ( bool  doUpdateImmediately,
bool  updatePartAttribute 
)

Update the associated objects according to the spreadsheet data with the options
Created in NX9.0.3.



License requirements : None

Parameters
doUpdateImmediatelySpecifies whether to perform an update immediately.
updatePartAttributeSpecifies whether part attributes should be updated.

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