Parametric PLC Database Find/Replace - AutoCAD Electrical

  • Coinciding with the acquisition of VIA Development, Nate joined Autodesk in March of 2003 after a decade stint as an entrepreneur following a two-decade stint as a controls engineer and software applications developer at Owens-Corning. Nate is now the lead product architect for AutoCAD Electrical. He loves this stuff.

    About Nate

Latest Post

  • Parametric PLC Database Find/Replace - AutoCAD Electrical
    December 15, 2008, 08:55 PM Nate Holt

    There are 4000 or so different PLC modules carried in the Access database shipped with AutoCAD Electrical. What if you want to adjust some annotation default across the whole library? This little AutoLISP utility may help!

    For example, the default tag-ID annotation format is "PLC%N" where the "%N" part is the next unused sequential or the current drawing line reference location. But what if you want to embed the sheet number in the default tag-ID? You want the default tag-ID format to be "PLC-%S-%N".

    Would be nice to just have some kind of quick Find/Replace tool to operate on the Microsoft Access database file "ace_plc.mdb".

    This tool might do it. It makes use of a handful of calls supplied with the AutoCAD Electrical API and is set up to operate on the ace_plc.mdb Access database file. This utility is in two pieces:

    A small AutoLISP "DCL" dialog definition file

    files/23001_23100/23031/file_23031.dcl - rename ace_plc_mdb_find_replace.dcl and put somewhere in your ACAD search path.

    A small AutoLISP ".LSP" program file

    files/23001_23100/23041/file_23041.lsp - rename ace_plc_mdb_find_replace.lsp and put somewhere in your ACAD search path.

    To Use:

    1. VERY IMPORTANT - make BACKUP of your ace_plc.mdb before you launch this utility ( ! ! ! ! ! )

    2. APPLOAD the ".lsp" file above

    3. Type this at the "Command:" prompt:

     ace_plc_mdb_find_replace [Enter]

    4. This dialog should pop up:

    5. Make selection as described in the illustration above. Enter the "Find" and "Replace" substrings and then hit OK.

    That should do it. Give it a try, but be careful... MAKE BACKUP OF YOUR FILE before you start.

    1 Comment | Add Comment Controlling the Machine >

Comments

  • January 5, 2009 01:05 PM David Shood

    Nate, Awesome I have wanted a routine to do this a long time ago. It worked great !!! Thanks, Dave Shood



You must be logged in to post a comment.

Subscribe to Blog

Want to keep up with the latest? Subscribe to the RSS feed today.

RSS

Tags

You must be logged in to add a tag.

Send to a Peer

You must login to share pages.

Feedback

Tell us what you think of the site.

Send Feedback