TechWatch
Technical hints from Premier EDA Solutions Ltd.

 

 

www.eda.co.uk

Creating a Filter Query Button

Item ID

AD6-0-01

Author

Andrew Mitchell

Applies to

Schematic: General

Created

28/02/06

Last modified

28/02/06


In this TechWatch we will be using Altium Designer 6 to create a custom button to run a filter query.

In a previous TechWatch we used a query to search for components on a schematic with a parameter indicating that they were not RoHS compliant.  We mentioned that it would be possible to make that query into a button for easy reuse, therefore we will use this query as the example for this TechWatch.

To start we need to create a new command for our Schematic editor which can be done by opening a schematic (File » New » Schematic) and the selecting DXP » Customize.  

Click New to create a new command, The process we need to set is called SCH:FilterSelect which can be found by clicking the Browse button.

Next we need to provide the parameters which will determine the filter query we wish to run and what we want to happen to the objects passing the filter.

And example set of parameters could be for finding all comments which are hidden, with the parameters below we are Masking and Clearing any existing filters but we are not selecting or zooming to them.  The Apply=True applies the query, without this the query IsComment And (Hide = 'True') would be placed into the Sch Filter panel ready for you to manually apply.

Expr=IsComment And (Hide = 'True') | Mask=True | Select=False | Zoom=False | ClearExisting=True | Apply=True

However, as mentioned earlier we are going to use a query to search for our none RoHS compliant components but you can of course use any query you wish.

In the Parameters box we need to type the following information using pipes to separate each parameter as below.

Expr=HasParameter('RoHS Compliant','No') | Mask=True | Select=True | Zoom=True | ClearExisting=True | Apply=True

As you can see we want to Mask, Select and Zoom any objects which pass our filter.

The next section of the Edit Command dialog box allows us to place a Caption and a Description for our command. The caption will be the text showing on a button or menu item and the description will be the tool tip which shows when hovering your mouse over the command.

Enter in the Caption of RoHS Compliancy and a Description of Filter None RoHS Compliant Parts

Below the Caption section we can apply an Image, if we wish, for a button or menu item, we are not going to but there are a number of examples under C:\Program Files\Altium Designer 6\System\Buttons if you wish to add an existing image to your command.

Below Image we can add Shortcuts for our command, for example Shift+R Click OK and our new command should be listed under the Category Custom.

With the command listed in the Customizing Sch Editor dialog box we can Left Mouse Click + Drag this command to any Toolbar or Menu within the schematic editor or if you just want to use the shortcut key you can just close the dialog box.

TIP: to move menu items without opening the customise dialog box use Alt + Left Mouse Click Drag and to enter the Edit Command dialog box use Ctrl + Left Mouse Click.

For more information and help on customising Altium designer see Help » Getting Started » Customizing the Altium Designer Resources

 

To email this article to a friend simply enter the recipient's e-mail and click Send:     

These FAQ documents have been provided to help you increase your knowledge of our products. If you have any feedback or suggestions please send them to our technical support department at support@eda.co.uk