7 Replies Latest reply on Sep 18, 2017 6:55 PM by MaxKielland

    How to change text alignment with script (console command)? [SOLVED]

    MaxKielland

      I'm writing a script (ULP) to smash all Resistors, Capacitors and Inductors and then set the text alignment to "Center" and move it to the origo of the package.

      Now I'm stuck on how to change the text alignment, I can't find any command to do that.

       

      Bonus question: How do I un-smash a smashed component in ULP?

        • Re: How to change text alignment with script (console command)?
          CadSoft Guest

          Max Kielland wrote:

          I'm writing a script (ULP) to smash all Resistors, Capacitors and

          Inductors and then set the text alignment to "Center" and move it to

          the origo of the package.

          Now I'm stuck on how to change the text alignment, I can't find any

          command to do that.

           

          in the ulp use "setgroup" to group all relevant texts (name, value,

          attributes?) then exit the ULP with

           

               change align centre (>0 0);

           

          (not tested though, does setgroup work with attributes at all?)

           

           

          or

           

               change align center (x y) ...

           

          where "x y" are the origin coordinates of a text

           

           

          Bonus question: How do I un-smash a smashed component in ULP?

           

          group the relevant parts then run "smash (>S0 0)"

           

          or

           

               smash (S x y)

           

          where "x y" are the origin coordinates ot the part to unsmash

          --

           

          Lorenz