• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Allegro X PCB Editor
  3. Find and Replace Text Utility

Stats

  • Replies 9
  • Subscribers 162
  • Views 19237
  • Members are here 0
More Content

Find and Replace Text Utility

vramanan
vramanan over 15 years ago

Hi

Warning: This is a partial code but does the work

after loading type "te" on the allegro command  window, when you choose a class/subclass, the grid will show all the available text in those layers(go up and down on the subclass to refresh the text)

The color button next to subclass will turn on/off that particular layer(thanks to dave elder's code)

When you click on a text in the gird, it will show up in actual text, you can change it there and press tab and it will be updated on the grid as well as the actual text

 For now I kept minium characters to be searched as 3, type it in the find box and press find button, this will only list those has the find pattern

 (find in all layers is not yet implemented, plan to show the layers in the second column)

type the new pattern on the Replace text and press Replace All, this will replace

(this funtion is incomplete because I am stuck at not able to refresh the grid, I know what's happening but I am little lazy to code it now

the dbids gets removed after replace function, I got to refind them and update)

 

Many Many thanks to Dave Elder since I am just improvising lot of his functions

I appreciate any feedback and comments, I welcome anyone willing to code further, I only wish me being indicated of the changes and willingness to share some code

 

regards

Venkata

  • Sign in to reply
  • Cancel
  • vramanan
    vramanan over 15 years ago

     There was a bug, which I corrected it

     

    Here is the updated code

     

    I will update the code again with all the features later

     

    regards

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • vramanan
    vramanan over 15 years ago

     Hi Guys

    This is working now, I fixed all the issues and here is the completed tool

    skill load "te.il"
    then type
    te

    Scenario 1: Find All text in a given layer
            a. Select the Active class from the top left pull Down
            b. Select the Subclass you want the texts to be found
    After that the Grid will update the rows with all the found text on the 1st column and their layer on the 2nd column

    You can click on any found text on the grid which will be editable on the "Active Text" box below the grid

    After you edit it the GRID will update the values on that particular text as well as grid display

    Scenario 2: Find and Replace a Specific Text in a given layer
            a. Select the Active Class/Sub Class from pull-downs
            b. Type the key you want to be found in the find box (minium 3 characters)
            c. Press "find"
            d. Type the Term you want to be replaced with on Replace box
            e. Press "Replace All"
            p.s. selecting a found text and editing in the active text will not update the grid properly
            I am lazy to think all the possibilities
           
    Scenario 3: Find and Replace a Specific Text in All Layers
            a. Type the key you want to be found in the find box (minium 3 characters)
            b. Press "find"
            c. Type the Term you want to be replaced with on Replace box
            d. Press "Replace in All Layers"
            p.s. selecting a found text and editing in the active text will not update the grid properly I am lazy to think all the possibilities
    ####### Usage ########

    I created the initial GUI with the help of KODA form designer and my XML2BNF(xml to skill) translator
    search for xml2bnf in the cadence community forum

    Lots of Thanks to Dave Elder for his functions and examples

    This code scores 95 marks with sklint

    Any comments and suggestions are welcome and contact me at vramanan at infinera.com

     

    regards

    Venkata

    te.zip
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • TommyBrunet
    TommyBrunet over 12 years ago

     Venkat,

     

    Tried skill today and it found all but one instance, board Geometry/Tooling_Corners.  It is buggy, and the instance-per-layer is not working.  Overall a good time saver though!

     

    Tommy

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • vramananx
    vramananx over 12 years ago

    Hi Tommy

    That was the initial release 2 years ago, I have fixed the bugs and updated the code 

    here is the updated code

    regards

    Venkata 

    te_11Dec12.zip
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • TommyBrunet
    TommyBrunet over 12 years ago
    Venkata,

    I have been happily using your text editor with great success when suddenly, about a week ago, the find in all layers function stopped working.  The only clue is the following error message:

    E- *Error* upperCase: argument #1 should be either a string or a symbol (type template = "S") - nil

    Do you have any insighte here?

    Thanks!

    Tommy
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
>
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information