Search & Replace plus Global Updates

January 2021

Circuit has some built in features for Finding and Replacing text within various entities, plus a Global Updates feature to change the values of texts in the Border, or through-out the Project using the $gene variables.

These tools only become available once a project has been loaded and activated.

Find

From the menu choose Edit > Find (or CTRL+F)...

Firstly, select in what range of Text objects you want to Search In, by using the pull down list... for an example, to demonstrate a very broad search, choose "text"...

Next put a wildcard in the Find Text box, literally an asterisk (*)...

Press [Ok] to proceed, or hit the top right hand [x] to cancel...

The result list should contain every text object in the project. Press [Close] when done.

Let's narrow this down, say we only want to see text's starting with Q... the search would become Q*...

From the results image above you can see the Sheet/Column.Row of the first result of Q1.

Using Find Features

Using group as a filter we can find only text objects that are of a group...

Again, we can filter, or even specify a particular group if we enter the exact text we're looking for.

To get text to copy, first select the row of interest from the results list...

Then copy the text from the box, as in RFWD shown above... high-light the text then press CTRL+C (or right click and choose Copy)...

Press [Close] on the search results dialogue then CTRL+F to start a new search.

Type in your value, or paste (CTRL+V) the copied text...

Press [Ok] to proceed...

The format is the same for finding $wire numbers...

And $terminals...

When searching for tags, for example all new items added on a particular day, you could use *041220 for an example as the search term, and all objects added on 4th December 2020 (UK format) would be listed...

Replace

From the menu choose Edit > Replace (or CTRL+R)...

All the same principles apply for using Replace as we did for Find.

Select a Search In context, enter a Find Text string and then enter Replace With text, for example...

CAUTION: Replacing Text CANNOT be undone!

So you will be prompted...

Changes made will be confirmed...

Now we can verify the replacement with a quick search...

And the results...

Globals

Globals work similar to Replace, except that it targets only gene variables.

Whenever you assign a gene in any text object, it can become a value that can be globally updated, for example $customer might be a gene in a text object in a Border file...

Once that Border is attached to your project, every sheet will have that $customer text entity. A global update can then reflect that text value change across every Sheet in one hit.

Examples

From the menu choose Edit > Globals (or CTRL+G)...

From the $property pull-down select $customer...

Note: Not all $properties are suitable for being updated, but for brevity, all are available for your use. For example, $counter is the pre-seed value for the wire numbering function, it has no purpose being displayed on a Sheet.

And as you are able to add your own properties it made no sense to try and constrain how you use this feature!

Then enter a Value...

Now because this particular $customer text entity is in the Border, it needs applied to every Sheet, so Current Sheet Only is un-checked.

Again, because this cannot be undone - yet is in no way as potentially far reaching as an error with the Replace function, you will be given a mild prompt...

The outcome will be displayed...

Note: The Global Update feature does not reflect back changes into the manifest.xml file! The reason being that only a few of the genes in the manifest file are system defined, and you can add your own properties to the manifest if required.

For an example, to make a fixed change to the $customer value, select the manifest node in the Project Explorer...

Find the relevant entry...

Click on the row and enter the new detail, for example...

Press [Apply] to proceed...

Press [Apply] to finish...

The new value is now set into the manifest, so next time you use the Globals form, it will be the default value offered.

Importantly though, if you only ever want to update a value manually, for example $revision, then be sure to leave it empty in the manifest...

That way, when the project is loaded, no attempt will be made to change all the $revision texts - unless of course you'd like that.

To change a single text on a Sheet that has a value unique to that Sheet, for example $sheet_number...

Then the option of Current Sheet Only checked becomes relevant...

Although every sheet would have this text object you'd probably only want to change this one (again, a reason why leaving $sheet_number blank in the manifest becomes important).

Once you press [Apply] and then [Done] the value update be reflected on the Sheet.

Summary

    • if a text object has a gene in the attached Border then it's value update will be reflected on every Sheet in the project

    • if a text object has a gene of a property in the manifest with a value, then it will be updated automatically through-out the project the next time the project is loaded

    • if a text object has a gene of a property in the manifest without a value, then it can be manually updated on a Sheet by Sheet, or project wide basis if required

That's all for using Find, Replace and Global Updates for now.