NXOpen .NET Reference Guide
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Public Types | Public Member Functions | Properties | List of all members
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 NXOpen.Utilities.NXRemotableObject IMessageSink

Public Types

enum  OpenPartType { NotSetDisplayPart, SetDisplayPartOnlyWhenOpen, AlwaysSetDisplayPart }
 The open part type enum More...
 
enum  SearchByType { Attribute, Body, Part }
 The search type enum More...
 
enum  ShapeSimilarity {
  Gradient1, Gradient2, Gradient3, Gradient4,
  Gradient5, Gradient6, Gradient7, Gradient8,
  Gradient9, Gradient10
}
 The search shape similarity enum More...
 
enum  ShapeSize {
  P90P110, P80P120, P70P130, P50P200,
  P25P400
}
 The search shape size enum More...
 

Public Member Functions

unsafe void ExecuteSearch (bool isNew, string searchName, out int nTotalResults, out string errorMessage)
 Execute new search or saved search and output error message if error. More...
 
unsafe string[] GetInputAttributesFilter ()
 The input attributes filter to be searched More...
 
unsafe string[] GetInputAttributesName ()
 The input attributes name to be searched More...
 
unsafe void GetResults (string searchName, int startResultId, int endResultId)
 Get specified search results from database. More...
 
unsafe void OpenResultPart (NXOpen.ShapeSearch.ShapeSearchBuilder.OpenPartType openPartType, string searchName, int resultId)
 Open the searched result part. More...
 
unsafe void SetInputAttributesFilter (string[] inputAttributesFilter)
 The input attributes filter to be searched More...
 
unsafe void SetInputAttributesName (string[] inputAttributesName)
 The input attributes name to be searched More...
 
- Public Member Functions inherited from NXOpen.Builder
unsafe NXOpen.NXObject Commit ()
 Commits any edits that have been applied to the builder. More...
 
unsafe void Destroy ()
 Deletes the builder, and cleans up any objects created by the builder. More...
 
unsafe NXOpen.NXObject[] GetCommittedObjects ()
 For builders that create more than one object, this method returns the objects that are created by commit. More...
 
unsafe NXOpen.NXObject GetObject ()
 Returns the object currently being edited by this builder. More...
 
unsafe void ShowResults ()
 Updates the model to reflect the result of an edit to the model for all builders that support showing results. More...
 
unsafe bool Validate ()
 Validate whether the inputs to the component are sufficient for commit to be called. More...
 
- Public Member Functions inherited from NXOpen.TaggedObject
void PrintTestData (String variableName)
 <exclude> More...
 
void PrintTestData (String variableName, int lineNumber)
 <exclude> More...
 
override string ToString ()
 Returns a String that represents the current Object. More...
 
- Public Member Functions inherited from NXOpen.Utilities.NXRemotableObject
IMessageCtrl AsyncProcessMessage (IMessage msg, IMessageSink replySink)
 Asynchronously processes the given message. More...
 
IMessage SyncProcessMessage (IMessage msg)
 Synchronously processes the given message. More...
 

Properties

unsafe int CustomShapeSizeLowerLimit [get, set]
 Returns or sets the custom shape size lower limit to be set for search. More...
 
unsafe int CustomShapeSizeUpperLimit [get, set]
 Returns or sets the custom shape size upper limit to be set for search. More...
 
unsafe NXOpen.SelectNXObjectList InputBody [get]
 Returns the input body to be searched More...
 
unsafe string InputPart [get, set]
 Returns or sets the input part to be searched More...
 
unsafe string ReferenceSetName [get, set]
 Returns or sets the part reference set name to be set for search More...
 
unsafe
NXOpen.ShapeSearch.ShapeSearchBuilder.ShapeSimilarity 
SearchShapeSimilarity [get, set]
 Returns or sets the shape similarity to be set for search More...
 
unsafe
NXOpen.ShapeSearch.ShapeSearchBuilder.ShapeSize 
SearchShapeSize [get, set]
 Returns or sets the shape size to be set for search. More...
 
unsafe
NXOpen.ShapeSearch.ShapeSearchBuilder.SearchByType 
SearchType [get, set]
 Returns or sets the search type More...
 
unsafe bool UseCustomShapeSize [get, set]
 Returns or sets the use custom shape size to control use shape size option or custom shape size More...
 

Additional Inherited Members

- Protected Member Functions inherited from NXOpen.TaggedObject
new void initialize ()
 <exclude> More...
 

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.SearchType )

  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 NXOpen.ShapeSearch.SearchManager.CreateShapeSearchBuilder

Created in NX6.0.0

Member Enumeration Documentation

The open part type enum

Enumerator
NotSetDisplayPart 

Not set the opened part as display part

SetDisplayPartOnlyWhenOpen 

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

AlwaysSetDisplayPart 

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

The search type enum

Enumerator
Attribute 

search by attributes

Body 

search by bodies

Part 

search by part

The search shape similarity enum

Enumerator
Gradient1 

search with identical condition

Gradient2 
Gradient3 
Gradient4 
Gradient5 
Gradient6 

search with very similar condition

Gradient7 
Gradient8 
Gradient9 
Gradient10 

search with similar condition

The search shape size enum

Enumerator
P90P110 

search with shape size 90%-110% condition

P80P120 

search with shape size 80%-120% condition

P70P130 

search with shape size 70%-130% condition

P50P200 

search with shape size 50%-200% condition

P25P400 

search with shape size 25%-400% condition

Member Function Documentation

unsafe void NXOpen.ShapeSearch.ShapeSearchBuilder.ExecuteSearch ( bool  isNew,
string  searchName,
out int  nTotalResults,
out string  errorMessage 
)
inline

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
nTotalResultsSearch result total number
errorMessageSearch error message
unsafe string [] NXOpen.ShapeSearch.ShapeSearchBuilder.GetInputAttributesFilter ( )
inline

The input attributes filter to be searched

Created in NX6.0.0

License requirements: shape_search ("Shape Search")

Returns
unsafe string [] NXOpen.ShapeSearch.ShapeSearchBuilder.GetInputAttributesName ( )
inline

The input attributes name to be searched

Created in NX6.0.0

License requirements: shape_search ("Shape Search")

Returns
unsafe void NXOpen.ShapeSearch.ShapeSearchBuilder.GetResults ( string  searchName,
int  startResultId,
int  endResultId 
)
inline

Get specified search results from database.

Created in NX6.0.0

License requirements: shape_search ("Shape Search")

Parameters
searchNameSearch name
startResultIdStart result id
endResultIdEnd result id
unsafe void NXOpen.ShapeSearch.ShapeSearchBuilder.OpenResultPart ( NXOpen.ShapeSearch.ShapeSearchBuilder.OpenPartType  openPartType,
string  searchName,
int  resultId 
)
inline

Open the searched result part.

Created in NX6.0.0

License requirements: shape_search ("Shape Search")

Parameters
openPartTypeOpen part type
searchNameSearch name
resultIdResult id
unsafe void NXOpen.ShapeSearch.ShapeSearchBuilder.SetInputAttributesFilter ( string[]  inputAttributesFilter)
inline

The input attributes filter to be searched

Created in NX6.0.0

License requirements: shape_search ("Shape Search")

Parameters
inputAttributesFilterSearch attributes filter
unsafe void NXOpen.ShapeSearch.ShapeSearchBuilder.SetInputAttributesName ( string[]  inputAttributesName)
inline

The input attributes name to be searched

Created in NX6.0.0

License requirements: shape_search ("Shape Search")

Parameters
inputAttributesNameSearch attributes Name

Property Documentation

unsafe int NXOpen.ShapeSearch.ShapeSearchBuilder.CustomShapeSizeLowerLimit
getset

Returns or 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 to get this property: shape_search ("Shape Search")

License requirements to set this property: shape_search ("Shape Search")

unsafe int NXOpen.ShapeSearch.ShapeSearchBuilder.CustomShapeSizeUpperLimit
getset

Returns or 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 to get this property: shape_search ("Shape Search")

License requirements to set this property: shape_search ("Shape Search")

unsafe NXOpen.SelectNXObjectList NXOpen.ShapeSearch.ShapeSearchBuilder.InputBody
get

Returns the input body to be searched

Created in NX6.0.0

License requirements: shape_search ("Shape Search")

unsafe string NXOpen.ShapeSearch.ShapeSearchBuilder.InputPart
getset

Returns or sets the input part to be searched

Created in NX6.0.0

License requirements to get this property: shape_search ("Shape Search")

License requirements to set this property: shape_search ("Shape Search")

unsafe string NXOpen.ShapeSearch.ShapeSearchBuilder.ReferenceSetName
getset

Returns or sets the part reference set name to be set for search

Created in NX6.0.0

License requirements to get this property: shape_search ("Shape Search")

License requirements to set this property: shape_search ("Shape Search")

unsafe NXOpen.ShapeSearch.ShapeSearchBuilder.ShapeSimilarity NXOpen.ShapeSearch.ShapeSearchBuilder.SearchShapeSimilarity
getset

Returns or sets the shape similarity to be set for search

Created in NX6.0.0

License requirements to get this property: shape_search ("Shape Search")

License requirements to set this property: shape_search ("Shape Search")

unsafe NXOpen.ShapeSearch.ShapeSearchBuilder.ShapeSize NXOpen.ShapeSearch.ShapeSearchBuilder.SearchShapeSize
getset

Returns or 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 to get this property: shape_search ("Shape Search")

License requirements to set this property: shape_search ("Shape Search")

unsafe NXOpen.ShapeSearch.ShapeSearchBuilder.SearchByType NXOpen.ShapeSearch.ShapeSearchBuilder.SearchType
getset

Returns or sets the search type

Created in NX6.0.0

License requirements to get this property: shape_search ("Shape Search")

License requirements to set this property: shape_search ("Shape Search")

unsafe bool NXOpen.ShapeSearch.ShapeSearchBuilder.UseCustomShapeSize
getset

Returns or sets the use custom shape size to control use shape size option or custom shape size

Created in NX6.0.0

License requirements to get this property: shape_search ("Shape Search")

License requirements to set this property: shape_search ("Shape Search")


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