TechWatch
Technical hints from Premier EDA Solutions Ltd.

 

 

www.eda.co.uk

Mass Editing and Object Manipulation

Item ID

PR2004-4-12

Author

Andrew Mitchell

Applies to

DXP: General

Created

29/09/05

Last modified

29/09/05


This TechWatch is based on first part of the Altium Designer presentation performed at our UK User Conference on the 6th Sept 2005

This first section is designed to introduce the methods within Protel for performing mass editing in each of the editors.Then moving onto include some of the more advanced features for manipulating objects using the List and Inspector panels.

Generally the process for editing multiple objects on Altium Designer is to select the objects and then use the Inspector panel to make the change. This does not mean that you have to go around shift clicking on every object you want to edit. There are many ways to select the objects you require.We will look at each of the methods.

Selection and the Inspector panel

The first section uses the one of the standard Altium Designer examples which can be found under Program Files\Altium2004_SP3\Examples\Reference Designs\4 Port Serial Interface\.

We start simply, double click C1 on the 4 Port UART and Line Drivers.SchDoc and it will show the Component Properties dialog box.

Obviously we can change any of the properties of the component in here.Now exit the dialog box and then select C1 by Left Mouse Clicking on it and open the Inspector Panel.  We can see we have access to the same properties in the Inspector panel as we did with the Components properties dialog box.

The difference being we can now go back to the schematic and use Shift and click to select C2 as well as C1

Opening the Inspector panel now you will see it now shows common properties for the two components, which we can edit.

For example uncheck the Show Designatorto hide the two designators on your schematic

Note at the top of the inspector panel we have hyperlink style text, which we canspan use to filter selected objects out that we are not interested in and select current or open documents.

Go back to the schematic and select the entire block of capacitors at the bottom left of the 4 Port UART and Line Driver.SchDoc, including the PCB directives and wires etc.

Then use the inspector panel to filter only Parts from this selection by clicking on Include all types of object and selecting Parts from the list.

You should now see that the inspector panel is once again populated, this time with the common properties for the selected parts

We also have hyperlinks within the listed properties to denote child objects. For example we can see that Component Designator is hyperlinked so if we want to we can go and change the properties of the designators for all of the selected parts.

Click the Component Designators hyperlink and then Click here to display all objects. Change the font and then click the Owner hyperlink to switch back to the original selection of our components.

List Panel

Now let’s look at the different ways we can select the objects we want to edit. First of all let’s look at the List panel, this is an extremely useful spreadsheet view of our design workspace.

Again at the top of the List panel we have these hyperlink style drop down combo boxes which allow us to filter the information in the List panel.

Change the top of List panel to be Edit All Objects from Current document Include only Parts

We can select and sort column as in a spread sheet, we can use the Right Click Menu to Choose Columns and move column order around, for example move the Component Designator and Part Comment columns to be after the Object Kind column.

We can double click on an object in the List panel to access its properties. We can select the objects in the list panel and then make global changes within the inspector panel.

As an example use the Right Click Menu to and perform a Select All, then open the Inspector panel and you will see we have the common properties for the selected parts available to edit.

With the List panel set to edit we can perform changes directly within the list panel itself.

This can either be done on a cell by cell bases or by using the normal Shift or Ctrl keys and Mouse to select the cells we wish to edit and then Right Mouse Button click and Edit.

Smart Edit

Using the Edit command will of course change all of the information in those cells identically, if you want to perform some more advanced editing select all of the capacitors and then right click on a Component Designator field and open the Smart Edit.

We can use this smart editor to perform text substitution. Previously to do this we would use the curly brackets but now they have added this new dialog box to help.

Change all of the C designators to CAP by leaving the C in the From column and typing CAP in the To column, which will produce the replacement string of {C=CAP}.

Click OK and you should see that all the capacitors are now CAP1, CAP2 etc...

We also have a Formula tab, which allows us to perform more advanced changes to our selected text strings. Here are some examples, note we can use ! to replace the current field name.

Add a character to a text string use it like this:


Component_Designator + 'Character'

Example: To append ‘_MEM' to the designators U1, U3 and U5 Component_Designator + ‘_MEM‘ or shortened form ! + ‘_MEM’ would produce U1_MEM etc…

Swap position of a few sub sets of text strings with:

Copy(!,1,4) 

Example: CommPortx_8 need to be changed to IOPortx_32 use 'IO' + Copy(!,5,6) + '32' 

To add the repeat statement for repeated ports just use:

'Repeat(' + ! + ')

Example: Headphone changes to Repeat(Headphone)

List Panel in PCB

Let’s move now the PCB editor and take a look at some more features of the list panel and other methods of selecting the objects we want to edit.

Using the 4 Port Serial Interface.pcbdoc as an example, if we select an area on our PCB we can perform a kind of block selection using our List panel.

Select the entire board and then open the List panel and change the top to View  Selected Objects Include Only Components.

Now we can use the right click menu and Apply Filter to filter just the components selected in our list panel and on the PCB

With this new selection we can now perform actions on the selected components or use the Inspector panel again it make changes to object.

The ability to use formula and expressions in the list panel is not just confined to editing text strings. We can also use them to move objects for example, what we can do now is use the Inspector panel to move our components.

I un-routed some parts of the board to make moving a little less messy and then I want to move the connector J1 down by 150thou

Select J1 and open the Inspector panel and type in the formula ! – 150mil in to the Y1 field

Note we use ! again but we could have typed in the name of the Field such as Y1 - 150

We can of course do this for multiple objects using the inspector panel and also in the list panel.

Query Builder and Find Similar Objects

We now have seen how we can perform multiple edits within Altium Designer without using the query language at all. However, the query language is a very powerful tool also. Learning the query language can be a daunting task but there are ways to cheat a little. We can, for example, use the Find Similar Objects and the Query Builder to create the expressions for us in the Filter panel.

Using Edit » Find Similar Objects use the cursor to select U2 Within the Find Similar Objects dialog box change Name to U* and set the Rotation to Same from the combo box to the right. Make sure Create Expression is turned on.

Click OK and you should see that we now have an expression for this created in the Filter panel of,

'Component' And (Name Like 'U*') And (Rotation = '270.000')

We could create a design rule based on this expression. Within the Filter panel we have a button called Create Rule. Using this we can create any rule we wish for our filtered objects.

For example a component clearance rule.

Click the Create Rule button and select the Component Clearance Constraint. Set up a quick check rule for 30mil.

Another method we can use to create a query is the Query Builder, specifically for PCB. The query builder can be found on the filter panel or under Edit » Build Query.  Lets select a net class, A[0..7] for example, and then we can change its colour in the Inspector panel so that it is easier to locate.

Edit » Query Builder and set Add first condition... to Belongs to Net Class with a Condition Value of A[0..2]. you can see that the Query preview is building up on the right hand side of the dialog box. Click OK and then use the Inspector panel to filter to Nets Only and change Colour.


If we were selecting a net class for some impedance controlled routing we might want to change its width slightly to ensure it’s unique. The idea being that an impedance route with a unique aperture in the Gerber will allow the manufacturer to play with it a little easier.

We can create and edit our queries directly in the Filter panel. Edit the Net Class directly in the Filter panel to D[0..7], you will see that it will auto complete for you, and open the Inspector panel.

We can again here filter the inspector to tracks and then make the change to the width. If the tracks were on multiple layers we could use a formula to edit the width of the track buy the same amount on each of the layers.

Use the Width + 0.1mil or! + 0.1mil formula to change the width of the tracks, naturally you would need to ensure that your design rules allowed the increased track width.

We can use the Query builder to create some reasonably complex queries, for example lets select all of the pads and vias in net +12V

Create a query in the builder for (IsPad IsVia) AND InNet('+12V'))

We can use the arrows at the top of the dialog box to make the parentheses for this to work.

Once you are happy with your queries, which ever method you have used to build them up, you can save them to your favourites

If you open up the Favourites from the Filter panel you can see that we can copy across queries from our History

Some examples of queries we have created include

I’ve put a couple example queries in there, locate buried vias, one to find micro vias and one to find testpoint vias

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