electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » Developers' Corner
SOLVED: EAGLE users? I'm trying to generate parts lists...
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [4 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Dougster



Joined: Sep 20, 2005
Posts: 272
Location: Tucson, AZ, USA

PostPosted: Tue Nov 27, 2012 5:27 pm    Post subject: SOLVED: EAGLE users? I'm trying to generate parts lists... Reply with quote  Mark this post and the followings unread

Well, the only tools I have found so far output a complete parts list from an entire schematic/board project. (BOM-EX rules BTW!) Cool

However, I have 18 pages of schematics for the project I'm trying to finish up and I'd like to output a separate parts list for each page. That way I have a list of all power supply parts and a separate list of all parts in the BD section, the SD section, etc. So far, I've had to either 1) output a complete list of all parts and edit it to suit, or 2) delete all but the current page of the schematics and output a parts list for it. Neither of these is a particularly optimal solution.

Does anybody know of a User Language Program (ULP) or some way of using attributes or something to make it easier to output a list of all the parts for each section of my design?

Thanks!
Doug

_________________
Once you start down the modular path, forever will it dominate your destiny!

Every DIY person should own a copy of Electronotes: http://electronotes.netfirms.com

Blue LEDs are evil.

Last edited by Dougster on Wed Nov 28, 2012 5:14 pm; edited 1 time in total
Back to top
View user's profile Send private message
Dougster



Joined: Sep 20, 2005
Posts: 272
Location: Tucson, AZ, USA

PostPosted: Wed Nov 28, 2012 5:13 pm    Post subject: Reply with quote  Mark this post and the followings unread

OK, I solved it. I posted my script on the EAGLE forum, but figured I'd put it here too, since this is my favorite forum. Cool

EAGLE really has a weird/interesting/nice scripting system. This is a ULP file, which is written in a C-like language. ULPs can go through a library, a schematic, or a board and process almost anything. Interestingly though, you can't actually change anything with a ULP, so you generate a command script that is run when you use the exit() command...

Code:

#usage "<b>Adds PAGE number attribute to each part on each page of a schematic.</b>";

string Version = "0.10";
string tmp = "";
string Message = "";
string Script = "";

if (!schematic) {
  dlgMessageBox("Start this ULP from a Schematic...", "OK");
} else {
  schematic(SCH) {
    sprintf(tmp, "Schematic Name:\n%s\n", SCH.name);
    dlgMessageBox(tmp);

    SCH.sheets(S) {
      sprintf(Message, "Sheet %d\n---------\nParts:\n", S.number);
      S.parts(P) {
        sprintf(tmp, "%s\n", P.name);
        Message += tmp;
        sprintf(tmp, "ATTRIBUTE %s PAGE '%d';\n", P.name, S.number);
        Script += tmp;
      }
      dlgMessageBox(Message);  // Dialog box with list of parts on page
    }
  }
  //dlgMessageBox(Script);  // Debugging - show script before executing
  exit(Script);
}


Regards,
Doug

_________________
Once you start down the modular path, forever will it dominate your destiny!

Every DIY person should own a copy of Electronotes: http://electronotes.netfirms.com

Blue LEDs are evil.
Back to top
View user's profile Send private message
mahjo



Joined: Jan 29, 2013
Posts: 5
Location: Thousten

PostPosted: Tue Jan 29, 2013 2:58 am    Post subject: Reply with quote  Mark this post and the followings unread

Hi Doug,

thanks for that script. Do you create ULPs on a regular basis?
Back to top
View user's profile Send private message
mahjo



Joined: Jan 29, 2013
Posts: 5
Location: Thousten

PostPosted: Tue Jan 29, 2013 3:20 am    Post subject: Reply with quote  Mark this post and the followings unread

Update: I found some useful ULPs here. I didn't know it was that easy to find help.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [4 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Developers' Corner
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use