2 Replies Latest reply on Mar 25, 2015 4:49 PM by jgardner

    Tracking / Renaming Text Objects

    jgardner

      Hi,

       

      At my company we use text objects in our designs for quite a bit, including reference/design numbers and notes.  I'm trying to figure out a way to automate updating these text objects when needed using a popup box (for example, there are probably five different places on the drawing where "DR-24592" shows up, and I want to use a pop up box to change that number using a script).

       

      I've noticed that there is a collection of text objects that are automatically numbered randomly.  I was wondering if there was a way to rename the text object (Text.Name) to something of my own choosing?  Or does anyone have any other ideas on how to put text onto a drawing in a way that can be explicitly tracked (i.e. some way of giving a name to something that would be preserved when you export and import an ASCII file)?

       

      Thanks,

      Jens

        • 1. Re: Tracking / Renaming Text Objects
          vkhurana

          I haven't done this but the way to approach this is to go through each sheet in the design then use Query() to get the components on that sheet.  Then go through all components to figure out the object type and if the object type is VDTS_TEXT then get the Name (or Label - not sure) to see if that is of interest or not.  If it is then change using TextString()

          • 2. Re: Tracking / Renaming Text Objects
            jgardner

            I think I figured out a way to handle this the way I want.  I didn't realize I was in the Xpedition section, I'm using PADS Layout 9.4.1, so sorry vkhurana, but thank you for replying.

             

            The best way for me to handle it is to combine the text with a shape (a dummy shape, which is on a different reference layer that won't show up in the gerbers), then save that shape to the library with a specific name.  The Drawing object (Document.Drawings) then will have a collection of texts associated with it (actually just one text).  If I just use one text line per drawing, then I can identify the drawing by the name I saved it by in the library, then modify that text.  It will be a lot of work to set up our default templates but once they're set up we can just run a script that identifies all the drawing names and modify the text associated with them.