NX Open C++ Reference Guide
Public Types | Public Member Functions
NXOpen::ShapeSearch::ShapeSearchBuilder Class Reference

This class provides the methods to execute shape search and get the searched results. More...

Inheritance diagram for NXOpen::ShapeSearch::ShapeSearchBuilder:
NXOpen::Builder NXOpen::TaggedObject NXOpen::GeometricUtilities::IComponentBuilder

List of all members.

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< NXStringGetInputAttributesFilter ()
 The input attributes filter to be searched.
std::vector< NXStringGetInputAttributesName ()
 The input attributes name to be searched.
void GetResults (const NXString &searchName, int startResultId, int endResultId)
 Get specified search results from database.
NXOpen::SelectNXObjectListInputBody ()
 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.

Detailed Description

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 )

  1. Search by attributes.

  2. Search by body combined attributes with shape similarity and shape size condition. Support multiple bodies.

  3. Search by part combined attributes with shape similarity and shape size condition. Support loaded part, OS part, Teamcenter part and component.

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.


Member Enumeration Documentation

The open part type enum.

Enumerator:
OpenPartTypeNotSetDisplayPart 

Not set the opened part as display part.

OpenPartTypeSetDisplayPartOnlyWhenOpen 

Set the opened part as display part only when it doesn't exist in the session.

OpenPartTypeAlwaysSetDisplayPart 

Always set the opened part as display part whether it exists in the session.

The search type enum.

Enumerator:
SearchByTypeAttribute 

search by attributes

SearchByTypeBody 

search by bodies

SearchByTypePart 

search by part

The search shape similarity enum.

Enumerator:
ShapeSimilarityIdentical 

search with identical condition

ShapeSimilarityVerySimilar 

search with very similar condition

ShapeSimilaritySimilar 

search with similar condition

The search shape size enum.

Enumerator:
ShapeSizeP90P110 

search with shape size 90%-110% condition

ShapeSizeP80P120 

search with shape size 80%-120% condition

ShapeSizeP70P130 

search with shape size 70%-130% condition

ShapeSizeP50P200 

search with shape size 50%-200% condition

ShapeSizeP25P400 

search with shape size 25%-400% condition


Member Function Documentation

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")

Parameters:
isNewTrue is executing new search, False is executing saved search
searchNameSearch name
NOTE: The full Unicode character set is not supported for this parameter.
nTotalResultsSearch result total number
errorMessageSearch error message

The input attributes filter to be searched.

Returns:

Created in NX6.0.0.

License requirements : shape_search ("Shape Search")

The input attributes name to be searched.

Returns:

Created in NX6.0.0.

License requirements : shape_search ("Shape Search")
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")

Parameters:
searchNameSearch name
NOTE: The full Unicode character set is not supported for this parameter.
startResultIdStart result id
endResultIdEnd 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")

Open the searched result part.


Created in NX6.0.0.

License requirements : shape_search ("Shape Search")

Parameters:
openPartTypeOpen part type
searchNameSearch name
NOTE: The full Unicode character set is not supported for this parameter.
resultIdResult id

Returns the part reference set name to be set for search
Created in NX6.0.0.



License requirements : shape_search ("Shape Search")

Returns the shape similarity to be set for search
Created in NX6.0.0.



License requirements : shape_search ("Shape Search")

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")

Returns the search type
Created in NX6.0.0.



License requirements : shape_search ("Shape Search")

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")

Parameters:
customShapeSizeLowerLimitcustomshapesizelowerlimit

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")

Parameters:
customShapeSizeUpperLimitcustomshapesizeupperlimit
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")

Parameters:
inputAttributesFilterSearch 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")

Parameters:
inputAttributesNameSearch attributes Name
NOTE: The full Unicode character set is not supported for this parameter.

Sets the input part to be searched
Created in NX6.0.0.



License requirements : shape_search ("Shape Search")

Parameters:
inputPartinputpart

Sets the part reference set name to be set for search
Created in NX6.0.0.



License requirements : shape_search ("Shape Search")

Parameters:
referenceSetNamereferencesetname

Sets the shape similarity to be set for search
Created in NX6.0.0.



License requirements : shape_search ("Shape Search")

Parameters:
searchShapeSimilaritysearchshapesimilarity

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")

Parameters:
searchShapeSizesearchshapesize

Sets the search type
Created in NX6.0.0.



License requirements : shape_search ("Shape Search")

Parameters:
searchTypesearchtype

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")

Parameters:
useCustomShapeSizeusecustomshapesize

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")


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