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. | |
int | CustomShapeSizeUpperLimit () |
Returns the custom shape size upper limit to be set for search. | |
void | ExecuteSearch (bool isNew, const NXString &searchName, int *nTotalResults, NXString *errorMessage) |
Execute new search or saved search and output error message if error. | |
std::vector< NXString > | GetInputAttributesFilter () |
The input attributes filter to be searched. | |
std::vector< NXString > | GetInputAttributesName () |
The input attributes name to be searched. | |
void | GetResults (const NXString &searchName, int startResultId, int endResultId) |
Get specified search results from database. | |
NXOpen::SelectNXObjectList * | InputBody () |
Returns the input body to be searched Created in NX6.0.0. | |
NXString | InputPart () |
Returns the input part to be searched Created in NX6.0.0. | |
void | OpenResultPart (NXOpen::ShapeSearch::ShapeSearchBuilder::OpenPartType openPartType, const NXString &searchName, int resultId) |
Open the searched result part. | |
NXString | ReferenceSetName () |
Returns the part reference set name to be set for search Created in NX6.0.0. | |
NXOpen::ShapeSearch::ShapeSearchBuilder::ShapeSimilarity | SearchShapeSimilarity () |
Returns the shape similarity to be set for search Created in NX6.0.0. | |
NXOpen::ShapeSearch::ShapeSearchBuilder::ShapeSize | SearchShapeSize () |
Returns the shape size to be set for search. | |
NXOpen::ShapeSearch::ShapeSearchBuilder::SearchByType | SearchType () |
Returns the search type Created in NX6.0.0. | |
void | SetCustomShapeSizeLowerLimit (int customShapeSizeLowerLimit) |
Sets the custom shape size lower limit to be set for search. | |
void | SetCustomShapeSizeUpperLimit (int customShapeSizeUpperLimit) |
Sets the custom shape size upper limit to be set for search. | |
void | SetInputAttributesFilter (std::vector< NXString > &inputAttributesFilter) |
The input attributes filter to be searched Created in NX6.0.0. | |
void | SetInputAttributesName (std::vector< NXString > &inputAttributesName) |
The input attributes name to be searched Created in NX6.0.0. | |
void | SetInputPart (const NXString &inputPart) |
Sets the input part to be searched Created in NX6.0.0. | |
void | SetReferenceSetName (const NXString &referenceSetName) |
Sets the part reference set name to be set for search Created in NX6.0.0. | |
void | SetSearchShapeSimilarity (NXOpen::ShapeSearch::ShapeSearchBuilder::ShapeSimilarity searchShapeSimilarity) |
Sets the shape similarity to be set for search Created in NX6.0.0. | |
void | SetSearchShapeSize (NXOpen::ShapeSearch::ShapeSearchBuilder::ShapeSize searchShapeSize) |
Sets the shape size to be set for search. | |
void | SetSearchType (NXOpen::ShapeSearch::ShapeSearchBuilder::SearchByType searchType) |
Sets the search type Created in NX6.0.0. | |
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. | |
bool | UseCustomShapeSize () |
Returns the use custom shape size to control use shape size option or custom shape size Created in NX6.0.0. |
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 ShapeSearch::SearchManager::CreateShapeSearchBuilder
Created in NX6.0.0.
The open part type enum.
The search shape size enum.
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")
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 NOTE: The full Unicode character set is not supported for this parameter. |
nTotalResults | Search result total number |
errorMessage | Search error message |
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 NOTE: The full Unicode character set is not supported for this parameter. |
startResultId | Start result id |
endResultId | End result id |
Returns the input body to be searched
Created in NX6.0.0.
License requirements : shape_search ("Shape Search")
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 NOTE: The full Unicode character set is not supported for this parameter. |
resultId | Result id |
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 NOTE: The full Unicode character set is not supported for this parameter. |
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 NOTE: The full Unicode character set is not supported for this parameter. |
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::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::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 |
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")