Run a Search via the Power Input BoxThe search language can be used both in the power input box and in the Advanced tab of the Find dialog box but also in macros. The search query both searches for the elements and automatically selects them. Searching using the Find... command generates a search query (expressed in the search language) displayed in the Generated query box of the Find dialog box. Any generated query can be run via the power input box or in macros, whether transformat or not. However, the transformat query is the only usable query whatever the session language, therefore any query you expect to run in different session languages must be written in this format. If you are not familiar with this format, you can display its contents and identify the syntax to be used prior to writing your transformat query using a hidden column (you need to drag the column separator next to the Query column to display it) in the Favorites tab of the Find dialog box: For instance, CATDrwSearch.DrwText.Name=test,in means that you will search for objects named "test" in the Drafting workbench using the "In <UI-Active object>" scope. The searched objects are sent to the current command. For instance, if the current command is Select, the objects are selected. The language to be used when entering your query is detailed hereafter. SyntaxYou can search for objects using the same criteria as with the command.The message catalog KeyboardInput.CATNls sets up the power input search syntax, and search language shortcuts. The localized version of this message catalog determines the exact syntax and shortcuts for each language. Operating SignsThe search language uses separators (whose role you will discover in various examples).
Search by NameYou can search for an object name. This is particularly useful if you renamed objects using Properties contextual command. The name can also contain special characters. , or theTo search for an object by its name, enter the following command: name:object_name or name=object_name or a command using an abbreviation referred to as a "shortcut" as follows: n:object_name where "object_name" is the name of the object. You can also use the "*" character as a wildcard to replace any number of characters. For example, the command: name:wheel* searches for all objects starting with the string "wheel". The message catalog KeyboardInput.CATNls sets up unambiguous default shortcuts. For example, there is no ambiguity between the shortcut c: (used in the power input area to enter a command), and col: (used for searches on color). In localized versions of the catalog, check that there are no identical shortcuts for two different items. If you want the search to be case sensitive, enter the following command: NAME:Wheel* searches for all objects starting with the string "Wheel".
Search by Name in GraphYou can search for an object name. This search is different from a search by name since it deals with the name as is displayed in the specification tree. To search for an object by its name as displayed in the specification tree, enter the following command: name in graph=object_name If you want the search to be case sensitive, enter the following command: NAME IN GRAPH=object_name This name may be customized and thus, may differ from the name you entered in the Properties dialog box. To illustrate this, suppose you have a part named "Shape1" whose properties are as follows: The part looks like this in the specification tree: Entering: name=*complex* gives no result since the search is based on the name displayed in the Name box of the Instance area. But entering: name in graph=*part* finds the part. Note that the tree item size defined in the Tree Appearance tab is not taken into account. Search by TypeYou can use the Type box in the Find dialog box to display a list of types (the types are translated in each language). To search for an object by its type, enter the following command: type:type or type=type or: t:type You can also search for types using the "." (period) as follows: Part Design.Pad searches for all objects of type Pad created using the Part Design workbench. The following syntax is also allowed: workbench.type.attribute= For example, entering: Part Design.Pad.Color=Sea Green searches for all objects of type Pad created using the Part Design workbench, and of the color Sea Green. You can omit the workbench name if the type exists only for this workbench: Part Design.Pad and: .Pad are equivalent. Similarly: Part Design.Pad.Color=Sea Green and: type=Pad & Color=Sea Green are also equivalent. Here are some more examples using other operators described in Search Using Operators: workbench.type.name=point* workbench.type.name!=point* workbench.type.name:point* and: workbench.type.color='sea green' workbench.type.color!='sea green' workbench.type.color:'sea green' Search by ColorYou assign colors to objects using the Color list in the Graphic tab, when using or the Properties contextual command. For a reminder about how to use this list, see Editing Graphic Properties. To search for an object of a specific color, enter the following command: color:color_name or: col:color_name where "color_name" is the color of the object. If the name of the color contains a blank (which is the case with most of the colors available), you can type the full name as follows: color:Sandy Brown You can also surround the blank or the color name with a single quote (by default) like this: color:Sandy' 'Brown or like this: color:'Sandy Brown' You can also search for colors using their RGB values. For example: color:'(211,178,125)' In addition to this, each color displayed in the Color list or in the color palette is identified by an index in the color table. Therefore, when searching for the "Salmon" color for instance, you can enter either: col:Salmon or: col:17 since "Salmon" is the 17th color in the color palette. The 16 colors available in the Color list are: Clicking More Colors... lets you access the Color chooser. Search by Product PropertiesYou assign properties to products (and parts in products) by right-clicking an element in the specification tree and selecting Properties, clicking the Product tab in the Properties dialog box, and setting the properties in the Product frame. The properties you can search for (the same as those you assigned to the element) are:
For example, the search queries: Product Description:completed Product' 'Description:completed 'Product Description':completed 'Product Description'=completed search for all elements whose Product Description is the text "completed". The property name is case sensitive. Search for Objects Belonging to a LayerYou can search for an object belonging to a specific layer (as seen in the Graphic Properties toolbar). To do so, enter the following command: l:layer_number or l=layer_number or layer:layer_number or layer=layer_number where "layer_number" is the number of the layer. Search for Objects Belonging to a Selection SetYou can search for an object belonging to a selection set. To do so, enter the following command: s:selection_set_name or set:selection_set_name where "selection_set_name" is the name of the selection set. If you want the search to be case sensitive, enter the following command: SET=selection_set_name The strings "name", "type", "color" and "set" are appropriate for the English language only. The message catalog KeyboardInput.CATNls determines the exact syntax for your language. Search for Visible or Hidden ElementsYou can search for visible, invisible, shown elements, or elements hidden in the No Show space. To do so, use the following syntax: visibility:visible vis:visible and: visibility:hidden vis:hidden Search for Line Thickness or LinetypeYou can search for objects with a specific line thickness or linetype (as seen in the Graphic Properties toolbar). To do so, use the following syntax: weight: w: or: dashed: d: When searching for lines with a specific weight, you can specify the weight index like this: weight:6,all to search for all lines which are 2.0000 mm thick. Search by SymbolYou can search for a point symbol. To do so, enter the following command: symbol:small full square or symbol=small full square or symb:small full square or symb=small full square searches for the following point symbol: . Capital letters are meaningless for the symbol name and you can also type: symbol:Small Full Square or symbol=SMALL FULL SQUARE The point symbols you can search for are:
Search Using FavoritesYou can search for objects using your favorite queries defined via the Favorites tab in the Find dialog box. To do so: favorite=favorite_query_name or favorite:favorite_query_name but you can also enter: f=favorite_query_name or f:favorite_query_name where "favorite_query_name" is the name of the favorite query. Note that the language used in favorite queries is case sensitive. When you press Enter, the search results are selected in the specification tree. You can use any of the special characters such as !. For example, let's use the query defined in the Favorites tab. This query searches for any element named "My Sketch". Now, suppose you want your search to select all elements whose names are other than "My Sketch", you just have to type: favorite!=Query_1 or f!=Query_1 In that case, the search scope is not modified. To modify the search scope, indicate the new scope after the favorite query name in the power input box: favorite=Query_1, from searches for any element named "My Sketch" From Search to bottom and not Everywhere as originally defined in Query_1. The new scope supersedes the previous one. You can also combine favorite queries with predefined favorite queries using operators. Search Using Predefined FavoritesYou can search for objects using predefined favorite queries that you run by entering specific shortcuts. These predefined favorite queries (which deal with V6 objects only) can be neither modified, nor deleted contrary to standard favorite queries you define in the Favorites tab of the Find dialog box. The shortcuts used to run these predefined queries have been defined to search "Everywhere". However, if the scr as Visible on screen option is selected in the Default Search Scope for Power Input list and if the Replaces scope defined in favorite queries option is selected, the queries will search for visible elements only. You can use the following shortcuts:
For instance, to search for all sketches everywhere, enter the appropriate shortcut after the prefix used to run favorite queries: f:*SKT or f=*SKT but you can also enter favorite:*SKT or favorite=*SKT
Predefined shortcuts are provided to search for elements having a characteristic in common with the element you select:
To run a predefined favorite query involving a selection, you need to select the object before or after entering the appropriate shortcut. For instance, to search for all objects with the same color as the selected object ("blue" in our example), select a "blue" object then enter: *COL or enter *COL and select the object. In that case, when you press Enter after entering the shortcut is entered, an acquisition agent opens: Select the object then click Close to close the acquisition agent. You can run predefined favorite queries with arguments. These predefined queries are run using the following shortcuts:
For instance, to search for all lines of type "Dotted" everywhere, enter the appropriate shortcut after the prefix used to run favorite queries: f:*LNT2 or f=*LNT2 but you can also enter favorite:*LNT2 or favorite=*LNT2
Search Using Special CharactersCharacters & + - ( ) play a special role in the search syntax. To be interpreted literally in names, those characters or text strings containing those characters must be surrounded by the character ' (apostrophe by default). For example: n:*')' searches for all names ending with ) n:*'&' searches for all names containing & n:*'(1)' searches for all names ending with (1). The following line in the KeyboardInput.CATNls resource file : Quote = " ' "; specifies the default character for surrounding strings. The character * is always interpreted as a wild card except if surrounded by two characters '. For example: n:*''*'' searches for all names ending with * n:*''*''* searches for all names containing * n:*'&'''*''* searches for all names containing &* n:'*)' searches for all names ending with ). This is identical to n:*')' The character ' must be doubled twice to be interpreted literally. For example: n:*''''* searches for all names containing a ' n:P''''* searches for all names beginning with P' n:P''''''''* searches for all names beginning with P'' n:P''''''''''''* searches for all names beginning with P''' n:P''''''''''''''''* searches for all names beginning with P''''. Search Using OperatorsYou can use operators to combine standard queries. The supported operators are: &, +, and - (for AND, OR and EXCEPT respectively) and ( ). Blanks are not considered as separators. They may be surrounded by ', but this is not mandatory. You can combine standard queries as follows: name:*wheel'&'door&type:Part name:*wheel'&'door & type:Part name:*'wheel&door' & type:Part name:*'wheel&door'& type:Part name:*wheel'&'door &type:Part all search for parts whose names end with "wheel&door". The command: name:wheel1 + name:wheel2 searches for objects named "wheel1" and objects named "wheel2". You can combine predefined favorite queries, favorite queries and standard queries Before you start, note the following information:
You can combine predefined favorite queries: Let's suppose you want to search for all lines or all points. You enter: f:*LN+*PT but you can also use any other favorite prefix (f=, favorite: or favorite=). This query searches for all lines and points everywhere since no scope has been specified and, as explained above, the scope of the predefined query is used. If you want to use another search scope, you need to specify it after the query. For instance, to search for all lines and points visible on screen, you can either set scr as Visible on screen as the default scope in the Default Search Scope for Power Input list (do not forget to select the Replaces scope defined in favorite queries option as well) or enter: f:*LN+*PT, scr You can combine predefined favorite queries and favorite queries: Let's suppose a favorite query named "Query_1". This query searches for all elements whose color is "black". If you want your search to select all lines and whose color is "black", you just have to type: f:*LN&Query_1 but you can also use any other favorite prefix (f=, favorite: or favorite=). You can combine predefined favorite queries and standard queries: Let's suppose you want to search for all sketches except those whose name ends with "1". You enter: f:*SKT-(n:*1) or f:*SKT-(name:*1) but you can also use any other favorite prefix (f=, favorite: or favorite=). You can combine predefined favorite queries, favorite queries and standard queries: Still using a favorite query named "Query_1" (which searches for all elements whose color is "black"), let's suppose you want to search for all lines and whose color is black or whose name ends with "3". You enter: f:*LN&(Query_1+n:*3) or f:*LN&(Query_1+name:*3) but you can also use any other favorite prefix (f=, favorite: or favorite=). PriorityThere is no priority among operators, but there is a priority in their order of appearance (from left to right). For example, the query: type:Part* & name:toto + type:Hole & Color:Black is interpreted as: type:Part* & (name:toto + (type:Hole & Color:Black) ) and thus searches for elements of type "Part" among the objects in the document that are "black holes" or named "toto". To avoid ambiguity, use parentheses like this: type:Part* & (name:toto + (type:Hole & Color:Black) ) to obtain the same result. Search Using Search ScopesYou can use the same search scopes as with Find dialog box) , by using the following context aliases: all, in, from, sel and scr. (except From search results which is only available in the
The default is in. Scope aliases must always be placed at the end of the search string, and after the separator "," like this: type:Hole, all The separator is the comma (",") for the English, Japanese, Korean and simplified Chinese environments, and the semi-colon (";") for all other supported environments. Search Using a Default PrefixA prefix is required to run a command or a query via the power input box. One prefix (c:) is already provided to run commands and several prefixes are dedicated to search queries. When searching for a name for instance, the value you type must be prefixed by n: or with name:, e.g. n:wheel. By default, no default prefix is defined. But if you use a default prefix, this avoids having to type the prefix when entering your query in the power input box, you just have to enter the search string. The default prefix is defined in the Find tab which provides a list of predefined prefixes. Suppose you select the prefix n: as name: in the Default Prefix for Power Input list then in the power input box, you enter only the name you are searching for such as: wheel to search for objects named "wheel". Search Using a Default Search ScopeYou can use a default search scope to avoid having to type the scope in the power input box. The default scope is in when running a query in the power input box. This means that if no scope alias is entered at the end of the search string, the search locates the appropriate elements in the active object and in the workbench you are currently using. The default search scope is defined in the Find tab which provides a list of predefined search scopes. For instance, if the scope all as Everywhere is selected in the Default Search Scope for Power Input list, you just need to enter: type:Hole instead of type:Hole, all to search for objects of type "Hole" in the whole specification tree from top to bottom. |