element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Autodesk EAGLE
  • Products
  • More
Autodesk EAGLE
EAGLE User Chat (English) sequentially moving components by name in l ist?
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Autodesk EAGLE to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 9 replies
  • Subscribers 187 subscribers
  • Views 1270 views
  • Users 0 members are here
Related

sequentially moving components by name in l ist?

autodeskguest
autodeskguest over 16 years ago

Hi,

 

Is there a way to list multiple components to do an operation on from the

command line...

 

What I'd like to do is type "move R1,R2,R3"

and then be moving r1 with the mouse, then when it's placed automatically

picking up R2, then automatically picking up R3.

 

Instead of having to type:

mov R1  (hand back to mouse and move R1)

mov R2 (back to mouse and move R2)

mov R3  (back to mouse and move R3)

 

Cheers,

 

Alex

 

 

 

--

Browser access to CadSoft Support Forums at http://www.eaglecentral.ca

 

  • Sign in to reply
  • Cancel
Parents
  • autodeskguest
    autodeskguest over 16 years ago

    Alex Faveluke wrote:

    Is there a way to list multiple components to do an operation on from the

    command line...

     

    What I'd like to do is type "move R1,R2,R3"

    and then be moving r1 with the mouse, then when it's placed automatically

    picking up R2, then automatically picking up R3.

     

    Instead of having to type:

    mov R1  (hand back to mouse and move R1)

    mov R2 (back to mouse and move R2)

    mov R3  (back to mouse and move R3)

     

    not out of the box (as far as I know)

     

    but you surely can create a ULP that can assist you there.

     

    I imagine a ULP that called with a list of part, stores the list in a

    file, then in exiting issues the move command to pic up the first part

    (letting you place it).

     

    On subsequent calls (via keyboard shortcut) the ULP pics the next part

    from the file and ...

    --

     

    Lorenz

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • autodeskguest
    autodeskguest over 16 years ago in reply to autodeskguest

    Lorenz wrote:

     

    Alex Faveluke wrote:

    Is there a way to list multiple components to do an operation on from the

    command line...

    but you surely can create a ULP that can assist you there.

     

    I imagine a ULP that called with a list of part, stores the list in a

    file, then in exiting issues the move command to pic up the first part

    (letting you place it).

     

    On subsequent calls (via keyboard shortcut) the ULP pics the next part

    from the file and ...

     

    the ULP could even build the list from the current selection (group)

    in the schematic.

    --

     

    Lorenz

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • autodeskguest
    autodeskguest over 16 years ago in reply to autodeskguest

    Grabbing stuff from a schematic selection would be cool.  I just have to

    decide if the increase in productivity would be worth the effort to learn

    how to do ULPs... of course, then I could do ULPs for other stuff too.

    I've done scripting of course

     

    What would be really, really cool would be for it to listen to an external

    process that did a little voice recognition.  Is there a way to set up IPC

    in ULPs, or monitor a file?    I work next door to guys using PADs and

    voice recognition would make them turn green.  That's a reason to learn

    ULPs!

     

    Any advice on simplest possible examples of ULPs for me to look at for

    examples?

     

    I do use the mov  R1 (move R1 w. mouse)  R2 ... R3... w/o having to retype

    in the mov command.

     

    Cheers,

     

    Alex

     

    --

    Browser access to CadSoft Support Forums at http://www.eaglecentral.ca

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • autodeskguest
    autodeskguest over 16 years ago in reply to autodeskguest

    Alex Faveluke wrote:

    A big question... is there a way to get the number of elements an array

    contains?   What I did with this is just keep incrementing the index until

    I get a NULL from the array.. which is intuitive, but scary.  You'd never

    do that in C.  Can I depend on stringarray[onepastlast] == "" ????    I

    guess

    I could also store the return linecount from fileread.

     

    That's what I 'd do.

     

     

    Got to bounce on the uparrow key to re-run the ULP.  I got it to call

    itself, but I can't figure out how to do multiple commands in the exit

    statement.. where the last command only executes after the "move" has been

    done.

     

    The command separator (image terminates the "move" before I've got a chance to

    actually move the component.  Anyways, it's still great, becuase I can hit

    uparrow/return with my keyboard hand a lot easier than typing in reference

    designators for each part.

     

    just assign a shortcut (help assign or via menu-options-assign)

     

    Out of curiousity, was the ULP language syntax derived from any other

    programming language.  It looks like C, but sure doesn't feel like it. 

     

    besides the object stuff it's like C

     

    By the way, the web forum seemed to hose the whitespace/linebreaks in your

    example.. which actually was probably good for me 'cause I was forced to

    understand the control flow while putting the indents back in. 

     

    I don't use the web forum, but the underlying newsgroup.

    Looking on my posting in the newsreader, the only lines that are

    messed-up are the trailing comments (that I always forget to keep

    under 80 chars 8-).

    --

     

    Lorenz

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • autodeskguest
    autodeskguest over 16 years ago in reply to autodeskguest

    faveluka wrote on Sun, 14 March 2010 05:04

    Thanks for the help, here's my shot at this.

     

    A big question... is there a way to get the number of elements an array

    contains?   What I did with this is just keep incrementing the index

    until I get a NULL from the array.. which is intuitive, but scary.

     

    That's the way to do it.

     

    Quote:

    By the way, the web forum seemed to hose the whitespace/linebreaks in

    your example.. which actually was probably good for me 'cause I was

    forced to understand the control flow while putting the indents back in.

     

     

    Use the and /code structure for that.  That will use a monospace

    font and retain the whitespace.  Click on the "BBcode in on" link to the

    left of the text window for all the syntax.  I know, that is a bad name and

    will be changed soon.

     

    Cheers,

     

    James.

    --

    James Morrison  ~~~  Stratford Digital

     

    email:  james@eaglecentral.ca

    web: http://www.eaglecentral.ca

     

    Specializing in CadSoft EAGLE

    • Online Sales to North America

    • Electronic Design Services

    • EAGLE Enterprise Toolkit

    --

    Browser access to CadSoft Support Forums at http://www.eaglecentral.ca

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • autodeskguest
    autodeskguest over 16 years ago in reply to autodeskguest

    Thanks for the help, here's my shot at this.

     

    I think it'll be pretty useful.. For example, when I want to place all

    components around an opamp, usually I'll  be looking back and forth between

    the schematic and board.. this way I'll just do the selection in the

    schematic and go.

     

    A big question... is there a way to get the number of elements an array

    contains?   What I did with this is just keep incrementing the index until

    I get a NULL from the array.. which is intuitive, but scary.  You'd never

    do that in C.  Can I depend on stringarray[onepastlast] == "" ????    I

    guess

    I could also store the return linecount from fileread.

     

    Got to bounce on the uparrow key to re-run the ULP.  I got it to call

    itself, but I can't figure out how to do multiple commands in the exit

    statement.. where the last command only executes after the "move" has been

    done.

     

    The command separator (image terminates the "move" before I've got a chance to

    actually move the component.  Anyways, it's still great, becuase I can hit

    uparrow/return with my keyboard hand a lot easier than typing in reference

    designators for each part.

     

    Out of curiousity, was the ULP language syntax derived from any other

    programming language.  It looks like C, but sure doesn't feel like it. 

     

    By the way, the web forum seemed to hose the whitespace/linebreaks in your

    example.. which actually was probably good for me 'cause I was forced to

    understand the control flow while putting the indents back in. 

     

    Cheers,

     

    Alex

     

     

    --

    Browser access to CadSoft Support Forums at http://www.eaglecentral.ca

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • autodeskguest
    autodeskguest over 16 years ago in reply to autodeskguest

    Thanks!

    I'm going to give it a shot.

     

    Alex

     

    --

    Browser access to CadSoft Support Forums at http://www.eaglecentral.ca

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • autodeskguest
    autodeskguest over 16 years ago in reply to autodeskguest

    Alex Faveluke wrote:

    Grabbing stuff from a schematic selection would be cool.  I just have to

    decide if the increase in productivity would be worth the effort to learn

    how to do ULPs... of course, then I could do ULPs for other stuff too.

    I've done scripting of course

     

    that's my experience too 8-)

     

     

    What would be really, really cool would be for it to listen to an external

    process that did a little voice recognition.  Is there a way to set up IPC

    in ULPs, or monitor a file?    I work next door to guys using PADs and

    voice recognition would make them turn green.  That's a reason to learn

    ULPs!

     

    well, no IPC that I know off, and monitoring a file from a ULP won't

    do either, because the ULP itself can't manipulate the board/schematic

    directly. It can only assemble a command string and execute it when

    terminating via 'exit()'

     

     

    Any advice on simplest possible examples of ULPs for me to look at for

    examples?

     

    I've attached a ULP that pics up the first part of the actual grouping

    in the schematic.

     

    Extending that to stash the part list in a file, getting the next part

    from the file when called from the board, and so on is left as an

    exercise to the reader 8-)

     

     

     

    void main ()

    {

      string s = "";

     

      // when run from schematic

      if (schematic) {

        schematic(S) {                                // get the schematic

    object

          S.parts(P) {                                // iterate though

    all parts in S

            if (    ingroup(P)                        // check if part is

    in the current grouping

                 && P.device.package                  //  and has a

    package (appears in the board that is)

               ) {

              if (s == "")

                s = P.name;                             // save the first

    part name for immediate use

     

              else {

                // stash the other part names into a file

              }

            }  

          }

        }

     

        if (s != "")

          project.board(B) {                            // accessing the

    board when the ULP is called in the schematic

                                                      //  requires the

    project prefix

            B.elements(E) {

              if (E.name == s) {

                if (E.locked) {

                  dlgMessageBox(s + " is locked in the board");

                  exit("");

                }

                else

                  exit("board; move " + s);

              }

            }

          }

        else

          dlgMessageBox("there seems to be no actual grouping in the

    schematic");

      }

     

      // when run from board

      else if (board) {

        // get the next part name from the file ...

        dlgMessageBox("to be implemented");

      }

    }

     

     

    --

     

    Lorenz

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • autodeskguest
    autodeskguest over 16 years ago in reply to autodeskguest

    Alex Faveluke wrote:

    Grabbing stuff from a schematic selection would be cool.  I just have to

    decide if the increase in productivity would be worth the effort to learn

    how to do ULPs... of course, then I could do ULPs for other stuff too.

    I've done scripting of course

     

    that's my experience too 8-)

     

     

    What would be really, really cool would be for it to listen to an external

    process that did a little voice recognition.  Is there a way to set up IPC

    in ULPs, or monitor a file?    I work next door to guys using PADs and

    voice recognition would make them turn green.  That's a reason to learn

    ULPs!

     

    well, no IPC that I know off, and monitoring a file from a ULP won't

    do either, because the ULP itself can't manipulate the board/schematic

    directly. It can only assemble a command string and execute it when

    terminating via 'exit()'

     

     

    Any advice on simplest possible examples of ULPs for me to look at for

    examples?

     

    I've attached a ULP that pics up the first part of the actual grouping

    in the schematic.

     

    Extending that to stash the part list in a file, getting the next part

    from the file when called from the board, and so on is left as an

    exercise to the reader 8-)

     

     

     

    void main ()

    {

      string s = "";

     

      // when run from schematic

      if (schematic) {

        schematic(S) {                                // get the schematic

    object

          S.parts(P) {                                // iterate though

    all parts in S

            if (    ingroup(P)                        // check if part is

    in the current grouping

                 && P.device.package                  //  and has a

    package (appears in the board that is)

               ) {

              if (s == "")

                s = P.name;                             // save the first

    part name for immediate use

     

              else {

                // stash the other part names into a file

              }

            }  

          }

        }

     

        if (s != "")

          project.board(B) {                            // accessing the

    board when the ULP is called in the schematic

                                                      //  requires the

    project prefix

            B.elements(E) {

              if (E.name == s) {

                if (E.locked) {

                  dlgMessageBox(s + " is locked in the board");

                  exit("");

                }

                else

                  exit("board; move " + s);

              }

            }

          }

        else

          dlgMessageBox("there seems to be no actual grouping in the

    schematic");

      }

     

      // when run from board

      else if (board) {

        // get the next part name from the file ...

        dlgMessageBox("to be implemented");

      }

    }

     

     

    --

     

    Lorenz

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • autodeskguest
    autodeskguest over 16 years ago in reply to autodeskguest

    Alex Faveluke wrote:

    A big question... is there a way to get the number of elements an array

    contains?   What I did with this is just keep incrementing the index until

    I get a NULL from the array.. which is intuitive, but scary.  You'd never

    do that in C.  Can I depend on stringarray[onepastlast] == "" ????    I

    guess

    I could also store the return linecount from fileread.

     

    That's what I 'd do.

     

     

    Got to bounce on the uparrow key to re-run the ULP.  I got it to call

    itself, but I can't figure out how to do multiple commands in the exit

    statement.. where the last command only executes after the "move" has been

    done.

     

    The command separator (image terminates the "move" before I've got a chance to

    actually move the component.  Anyways, it's still great, becuase I can hit

    uparrow/return with my keyboard hand a lot easier than typing in reference

    designators for each part.

     

    just assign a shortcut (help assign or via menu-options-assign)

     

    Out of curiousity, was the ULP language syntax derived from any other

    programming language.  It looks like C, but sure doesn't feel like it. 

     

    besides the object stuff it's like C

     

    By the way, the web forum seemed to hose the whitespace/linebreaks in your

    example.. which actually was probably good for me 'cause I was forced to

    understand the control flow while putting the indents back in. 

     

    I don't use the web forum, but the underlying newsgroup.

    Looking on my posting in the newsreader, the only lines that are

    messed-up are the trailing comments (that I always forget to keep

    under 80 chars 8-).

    --

     

    Lorenz

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • autodeskguest
    autodeskguest over 16 years ago in reply to autodeskguest

    faveluka wrote on Sun, 14 March 2010 05:04

    Thanks for the help, here's my shot at this.

     

    A big question... is there a way to get the number of elements an array

    contains?   What I did with this is just keep incrementing the index

    until I get a NULL from the array.. which is intuitive, but scary.

     

    That's the way to do it.

     

    Quote:

    By the way, the web forum seemed to hose the whitespace/linebreaks in

    your example.. which actually was probably good for me 'cause I was

    forced to understand the control flow while putting the indents back in.

     

     

    Use the and /code structure for that.  That will use a monospace

    font and retain the whitespace.  Click on the "BBcode in on" link to the

    left of the text window for all the syntax.  I know, that is a bad name and

    will be changed soon.

     

    Cheers,

     

    James.

    --

    James Morrison  ~~~  Stratford Digital

     

    email:  james@eaglecentral.ca

    web: http://www.eaglecentral.ca

     

    Specializing in CadSoft EAGLE

    • Online Sales to North America

    • Electronic Design Services

    • EAGLE Enterprise Toolkit

    --

    Browser access to CadSoft Support Forums at http://www.eaglecentral.ca

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • autodeskguest
    autodeskguest over 16 years ago in reply to autodeskguest

    Thanks for the help, here's my shot at this.

     

    I think it'll be pretty useful.. For example, when I want to place all

    components around an opamp, usually I'll  be looking back and forth between

    the schematic and board.. this way I'll just do the selection in the

    schematic and go.

     

    A big question... is there a way to get the number of elements an array

    contains?   What I did with this is just keep incrementing the index until

    I get a NULL from the array.. which is intuitive, but scary.  You'd never

    do that in C.  Can I depend on stringarray[onepastlast] == "" ????    I

    guess

    I could also store the return linecount from fileread.

     

    Got to bounce on the uparrow key to re-run the ULP.  I got it to call

    itself, but I can't figure out how to do multiple commands in the exit

    statement.. where the last command only executes after the "move" has been

    done.

     

    The command separator (image terminates the "move" before I've got a chance to

    actually move the component.  Anyways, it's still great, becuase I can hit

    uparrow/return with my keyboard hand a lot easier than typing in reference

    designators for each part.

     

    Out of curiousity, was the ULP language syntax derived from any other

    programming language.  It looks like C, but sure doesn't feel like it. 

     

    By the way, the web forum seemed to hose the whitespace/linebreaks in your

    example.. which actually was probably good for me 'cause I was forced to

    understand the control flow while putting the indents back in. 

     

    Cheers,

     

    Alex

     

     

    --

    Browser access to CadSoft Support Forums at http://www.eaglecentral.ca

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • autodeskguest
    autodeskguest over 16 years ago in reply to autodeskguest

    Thanks!

    I'm going to give it a shot.

     

    Alex

     

    --

    Browser access to CadSoft Support Forums at http://www.eaglecentral.ca

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube