NX Open C++ Reference Guide
|
This class provides the methods to execute shape search and get the searched results. More...
Public Types | |
enum | OpenPartType { OpenPartTypeNotSetDisplayPart, OpenPartTypeSetDisplayPartOnlyWhenOpen, OpenPartTypeAlwaysSetDisplayPart } |
The open part type enum. More... | |
enum | SearchByType { SearchByTypeAttribute, SearchByTypeBody, SearchByTypePart } |
The search type enum. More... | |
enum | ShapeSimilarity { ShapeSimilarityIdentical, ShapeSimilarityVerySimilar, ShapeSimilaritySimilar } |
The search shape similarity enum. More... | |
enum | ShapeSize { ShapeSizeP90P110, ShapeSizeP80P120, ShapeSizeP70P130, ShapeSizeP50P200, ShapeSizeP25P400 } |
The search shape size enum. More... | |
Public Member Functions | |
int | CustomShapeSizeLowerLimit () |
Returns the custom shape size lower limit to be set for search. More... | |
int | CustomShapeSizeUpperLimit () |
Returns the custom shape size upper limit to be set for search. More... | |
void | ExecuteSearch (bool isNew, const NXString &searchName, int *nTotalResults, NXString *errorMessage) |
Execute new search or saved search and output error message if error. More... | |
void | ExecuteSearch (bool isNew, const char *searchName, int *nTotalResults, NXString *errorMessage) |
Execute new search or saved search and output error message if error. More... | |
std::vector< NXString > | GetInputAttributesFilter () |
The input attributes filter to be searched. More... | |
std::vector< NXString > | GetInputAttributesName () |
The input attributes name to be searched. More... | |
void | GetResults (const NXString &searchName, int startResultId, int endResultId) |
Get specified search results from database. More... | |
void | GetResults (const char *searchName, int startResultId, int endResultId) |
Get specified search results from database. More... | |
NXOpen::SelectNXObjectList * | InputBody () |
Returns the input body to be searched Created in NX6.0.0. More... | |
NXString | InputPart () |
Returns the input part to be searched Created in NX6.0.0. More... | |
void | OpenResultPart (NXOpen::ShapeSearch::ShapeSearchBuilder::OpenPartType openPartType, const NXString &searchName, int resultId) |
Open the searched result part. More... | |
void | OpenResultPart (NXOpen::ShapeSearch::ShapeSearchBuilder::OpenPartType openPartType, const char *searchName, int resultId) |
Open the searched result part. More... | |
NXString | ReferenceSetName () |
Returns the part reference set name to be set for search Created in NX6.0.0. More... | |
NXOpen::ShapeSearch::ShapeSearchBuilder::ShapeSimilarity | SearchShapeSimilarity () |
Returns the shape similarity to be set for search Created in NX6.0.0. More... | |
NXOpen::ShapeSearch::ShapeSearchBuilder::ShapeSize | SearchShapeSize () |
Returns the shape size to be set for search. More... | |
NXOpen::ShapeSearch::ShapeSearchBuilder::SearchByType | SearchType () |
Returns the search type Created in NX6.0.0. More... | |
void | SetCustomShapeSizeLowerLimit (int customShapeSizeLowerLimit) |
Sets the custom shape size lower limit to be set for search. More... | |
void | SetCustomShapeSizeUpperLimit (int customShapeSizeUpperLimit) |
Sets the custom shape size upper limit to be set for search. More... | |
void | SetInputAttributesFilter (std::vector< NXString > &inputAttributesFilter) |
The input attributes filter to be searched Created in NX6.0.0. More... | |
void | SetInputAttributesName (std::vector< NXString > &inputAttributesName) |
The input attributes name to be searched Created in NX6.0.0. More... | |
void | SetInputPart (const NXString &inputPart) |
Sets the input part to be searched Created in NX6.0.0. More... | |
void | SetInputPart (const char *inputPart) |
Sets the input part to be searched Created in NX6.0.0. More... | |
void | SetReferenceSetName (const NXString &referenceSetName) |
Sets the part reference set name to be set for search Created in NX6.0.0. More... | |
void | SetReferenceSetName (const char *referenceSetName) |
Sets the part reference set name to be set for search Created in NX6.0.0. More... | |
void | SetSearchShapeSimilarity (NXOpen::ShapeSearch::ShapeSearchBuilder::ShapeSimilarity searchShapeSimilarity) |
Sets the shape similarity to be set for search Created in NX6.0.0. More... | |
void | SetSearchShapeSize (NXOpen::ShapeSearch::ShapeSearchBuilder::ShapeSize searchShapeSize) |
Sets the shape size to be set for search. More... | |
void | SetSearchType (NXOpen::ShapeSearch::ShapeSearchBuilder::SearchByType searchType) |
Sets the search type Created in NX6.0.0. More... | |
void | SetUseCustomShapeSize (bool useCustomShapeSize) |
Sets the use custom shape size to control use shape size option or custom shape size Created in NX6.0.0. More... | |
bool | UseCustomShapeSize () |
Returns the use custom shape size to control use shape size option or custom shape size Created in NX6.0.0. More... | |
Public Member Functions inherited from NXOpen::Builder | |
NXOpen::NXObject * | Commit () |
Commits any edits that have been applied to the builder. More... | |
void | Destroy () |
Deletes the builder, and cleans up any objects created by the builder. More... | |
std::vector< NXOpen::NXObject * > | GetCommittedObjects () |
For builders that create more than one object, this method returns the objects that are created by commit. More... | |
NXOpen::NXObject * | GetObject () |
Returns the object currently being edited by this builder. More... | |
void | ShowResults () |
Updates the model to reflect the result of an edit to the model for all builders that support showing results. More... | |
virtual bool | Validate () |
Validate whether the inputs to the component are sufficient for commit to be called. More... | |
Public Member Functions inherited from NXOpen::TaggedObject | |
tag_t | Tag () const |
Returns the tag of this object. More... | |
This class provides the methods to execute shape search and get the searched results.
The operation that this builder supports has three types: (set by ShapeSearch::ShapeSearchBuilder::SetSearchType )
Search by attributes.
Search by body combined attributes with shape similarity and shape size condition. Support multiple bodies.
When initialize builder, we will load all saved searches from work directory and add them to search list. You can implement ShapeSearch::ShapeSearchBuilder::ExecuteSearch to run the saved search.
After define the search criteria, function ShapeSearch::ShapeSearchBuilder::ExecuteSearch can search the shape from database and return the searched results count and error message if fails. The search is specified by 'searchName' parameter.
The method ShapeSearch::ShapeSearchBuilder::GetResults can get the specified results from database. The range of results is specified by the parameters 'startResultId' and 'endResultId', the search is specified by 'searchName' parameter.
The method ShapeSearch::ShapeSearchBuilder::OpenResultPart can open the selected result part of the specified search. The result is specified by 'resultId' parameter, the search is specified by 'searchName' parameter.
To create a new instance of this class, use NXOpen::ShapeSearch::SearchManager::CreateShapeSearchBuilder
Created in NX6.0.0.
The open part type enum.
The search shape size enum.
int NXOpen::ShapeSearch::ShapeSearchBuilder::CustomShapeSizeLowerLimit | ( | ) |
Returns the custom shape size lower limit to be set for search.
It is used only when use custom shape size is true. It must be greater than zero and less than upper limit.
Created in NX6.0.0.
License requirements : shape_search ("Shape Search")
int NXOpen::ShapeSearch::ShapeSearchBuilder::CustomShapeSizeUpperLimit | ( | ) |
Returns the custom shape size upper limit to be set for search.
It is used only when use custom shape size is true. It must be greater than lower limit.
Created in NX6.0.0.
License requirements : shape_search ("Shape Search")
void NXOpen::ShapeSearch::ShapeSearchBuilder::ExecuteSearch | ( | bool | isNew, |
const NXString & | searchName, | ||
int * | nTotalResults, | ||
NXString * | errorMessage | ||
) |
Execute new search or saved search and output error message if error.
Created in NX6.0.0.
License requirements : shape_search ("Shape Search")
isNew | True is executing new search, False is executing saved search |
searchName | Search name |
nTotalResults | Search result total number |
errorMessage | Search error message |
void NXOpen::ShapeSearch::ShapeSearchBuilder::ExecuteSearch | ( | bool | isNew, |
const char * | searchName, | ||
int * | nTotalResults, | ||
NXString * | errorMessage | ||
) |
Execute new search or saved search and output error message if error.
Created in NX6.0.0.
License requirements : shape_search ("Shape Search")
isNew | True is executing new search, False is executing saved search |
searchName | Search name |
nTotalResults | Search result total number |
errorMessage | Search error message |
std::vector<NXString> NXOpen::ShapeSearch::ShapeSearchBuilder::GetInputAttributesFilter | ( | ) |
The input attributes filter to be searched.
std::vector<NXString> NXOpen::ShapeSearch::ShapeSearchBuilder::GetInputAttributesName | ( | ) |
The input attributes name to be searched.
void NXOpen::ShapeSearch::ShapeSearchBuilder::GetResults | ( | const NXString & | searchName, |
int | startResultId, | ||
int | endResultId | ||
) |
Get specified search results from database.
Created in NX6.0.0.
License requirements : shape_search ("Shape Search")
searchName | Search name |
startResultId | Start result id |
endResultId | End result id |
void NXOpen::ShapeSearch::ShapeSearchBuilder::GetResults | ( | const char * | searchName, |
int | startResultId, | ||
int | endResultId | ||
) |
Get specified search results from database.
Created in NX6.0.0.
License requirements : shape_search ("Shape Search")
searchName | Search name |
startResultId | Start result id |
endResultId | End result id |
NXOpen::SelectNXObjectList* NXOpen::ShapeSearch::ShapeSearchBuilder::InputBody | ( | ) |
Returns the input body to be searched
Created in NX6.0.0.
License requirements : shape_search ("Shape Search")
NXString NXOpen::ShapeSearch::ShapeSearchBuilder::InputPart | ( | ) |
Returns the input part to be searched
Created in NX6.0.0.
License requirements : shape_search ("Shape Search")
void NXOpen::ShapeSearch::ShapeSearchBuilder::OpenResultPart | ( | NXOpen::ShapeSearch::ShapeSearchBuilder::OpenPartType | openPartType, |
const NXString & | searchName, | ||
int | resultId | ||
) |
Open the searched result part.
Created in NX6.0.0.
License requirements : shape_search ("Shape Search")
openPartType | Open part type |
searchName | Search name |
resultId | Result id |
void NXOpen::ShapeSearch::ShapeSearchBuilder::OpenResultPart | ( | NXOpen::ShapeSearch::ShapeSearchBuilder::OpenPartType | openPartType, |
const char * | searchName, | ||
int | resultId | ||
) |
Open the searched result part.
Created in NX6.0.0.
License requirements : shape_search ("Shape Search")
openPartType | Open part type |
searchName | Search name |
resultId | Result id |
NXString NXOpen::ShapeSearch::ShapeSearchBuilder::ReferenceSetName | ( | ) |
Returns the part reference set name to be set for search
Created in NX6.0.0.
License requirements : shape_search ("Shape Search")
NXOpen::ShapeSearch::ShapeSearchBuilder::ShapeSimilarity NXOpen::ShapeSearch::ShapeSearchBuilder::SearchShapeSimilarity | ( | ) |
Returns the shape similarity to be set for search
Created in NX6.0.0.
License requirements : shape_search ("Shape Search")
NXOpen::ShapeSearch::ShapeSearchBuilder::ShapeSize NXOpen::ShapeSearch::ShapeSearchBuilder::SearchShapeSize | ( | ) |
Returns the shape size to be set for search.
It is used only when use custom shape size is false.
Created in NX6.0.0.
License requirements : shape_search ("Shape Search")
NXOpen::ShapeSearch::ShapeSearchBuilder::SearchByType NXOpen::ShapeSearch::ShapeSearchBuilder::SearchType | ( | ) |
Returns the search type
Created in NX6.0.0.
License requirements : shape_search ("Shape Search")
void NXOpen::ShapeSearch::ShapeSearchBuilder::SetCustomShapeSizeLowerLimit | ( | int | customShapeSizeLowerLimit | ) |
Sets the custom shape size lower limit to be set for search.
It is used only when use custom shape size is true. It must be greater than zero and less than upper limit.
Created in NX6.0.0.
License requirements : shape_search ("Shape Search")
customShapeSizeLowerLimit | customshapesizelowerlimit |
void NXOpen::ShapeSearch::ShapeSearchBuilder::SetCustomShapeSizeUpperLimit | ( | int | customShapeSizeUpperLimit | ) |
Sets the custom shape size upper limit to be set for search.
It is used only when use custom shape size is true. It must be greater than lower limit.
Created in NX6.0.0.
License requirements : shape_search ("Shape Search")
customShapeSizeUpperLimit | customshapesizeupperlimit |
void NXOpen::ShapeSearch::ShapeSearchBuilder::SetInputAttributesFilter | ( | std::vector< NXString > & | inputAttributesFilter | ) |
The input attributes filter to be searched
Created in NX6.0.0.
License requirements : shape_search ("Shape Search")
inputAttributesFilter | Search attributes filter |
void NXOpen::ShapeSearch::ShapeSearchBuilder::SetInputAttributesName | ( | std::vector< NXString > & | inputAttributesName | ) |
The input attributes name to be searched
Created in NX6.0.0.
License requirements : shape_search ("Shape Search")
inputAttributesName | Search attributes Name |
void NXOpen::ShapeSearch::ShapeSearchBuilder::SetInputPart | ( | const NXString & | inputPart | ) |
Sets the input part to be searched
Created in NX6.0.0.
License requirements : shape_search ("Shape Search")
inputPart | inputpart |
void NXOpen::ShapeSearch::ShapeSearchBuilder::SetInputPart | ( | const char * | inputPart | ) |
Sets the input part to be searched
Created in NX6.0.0.
License requirements : shape_search ("Shape Search")
inputPart | inputpart |
void NXOpen::ShapeSearch::ShapeSearchBuilder::SetReferenceSetName | ( | const NXString & | referenceSetName | ) |
Sets the part reference set name to be set for search
Created in NX6.0.0.
License requirements : shape_search ("Shape Search")
referenceSetName | referencesetname |
void NXOpen::ShapeSearch::ShapeSearchBuilder::SetReferenceSetName | ( | const char * | referenceSetName | ) |
Sets the part reference set name to be set for search
Created in NX6.0.0.
License requirements : shape_search ("Shape Search")
referenceSetName | referencesetname |
void NXOpen::ShapeSearch::ShapeSearchBuilder::SetSearchShapeSimilarity | ( | NXOpen::ShapeSearch::ShapeSearchBuilder::ShapeSimilarity | searchShapeSimilarity | ) |
Sets the shape similarity to be set for search
Created in NX6.0.0.
License requirements : shape_search ("Shape Search")
searchShapeSimilarity | searchshapesimilarity |
void NXOpen::ShapeSearch::ShapeSearchBuilder::SetSearchShapeSize | ( | NXOpen::ShapeSearch::ShapeSearchBuilder::ShapeSize | searchShapeSize | ) |
Sets the shape size to be set for search.
It is used only when use custom shape size is false.
Created in NX6.0.0.
License requirements : shape_search ("Shape Search")
searchShapeSize | searchshapesize |
void NXOpen::ShapeSearch::ShapeSearchBuilder::SetSearchType | ( | NXOpen::ShapeSearch::ShapeSearchBuilder::SearchByType | searchType | ) |
Sets the search type
Created in NX6.0.0.
License requirements : shape_search ("Shape Search")
searchType | searchtype |
void NXOpen::ShapeSearch::ShapeSearchBuilder::SetUseCustomShapeSize | ( | bool | useCustomShapeSize | ) |
Sets the use custom shape size to control use shape size option or custom shape size
Created in NX6.0.0.
License requirements : shape_search ("Shape Search")
useCustomShapeSize | usecustomshapesize |
bool NXOpen::ShapeSearch::ShapeSearchBuilder::UseCustomShapeSize | ( | ) |
Returns the use custom shape size to control use shape size option or custom shape size
Created in NX6.0.0.
License requirements : shape_search ("Shape Search")