Home > Community > Forums > PCB Design > Search/Replace text only in selected items


* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Search/Replace text only in selected items 

Last post Fri, Sep 27 2013 7:15 PM by wurzelsd. 0 replies.
Started by wurzelsd 27 Sep 2013 07:15 PM. Topic has 0 replies and 364 views
Page 1 of 1 (1 items)
Sort Posts:
  • Fri, Sep 27 2013 7:15 PM

    • wurzelsd
    • Not Ranked
    • Joined on Fri, Sep 27 2013
    • Posts 1
    • Points 5
    Search/Replace text only in selected items Reply

    I'm using Orcad Capture 16.6 and I'm copying and pasting some very wide buses.  After each copy, I'd like to be able to select all the ports and aliases on one bus and rename a common part of the net name to something different.  This would be vastly faster than clicking each one, or doing edit->properties, or exporting to Excel, all of which I've done.

     The Tcl examples include one script that does text search/replace on various types of objects.  The problem is that it does everything on the page (or global) so all my buses get renamed, not just the one I want.  

    Could someone skilled with the Tcl scripting please suggest the patches needed to add a "Selected Only" checkbox to the find/replace GUI and then make the actual search/replace routines respect this?  

    I see in the TclTk_Extensions PDF that there is a function called GetSelectedObjects.  Would it be possible to call this inside of each of the capVisitPageXXXX routines and then search this list to see if the object is in there before making a change?  Or is there an easier way to determine if an object is selected (like an IsSelected attribute for each object)?  

    If I make these changes in tools/capture/tclscripts/capDB will they be available the next time I start up Capture or is there some other location for the "real" working copies of these scripts? 


    • Post Points: 5
Page 1 of 1 (1 items)
Sort Posts:
Started by wurzelsd at 27 Sep 2013 07:15 PM. Topic has 0 replies.