To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cadOpen lugnet.cad in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / 11833
11832  |  11834
Subject: 
Re: Complete/recursive parts listings?
Newsgroups: 
lugnet.cad
Date: 
Fri, 20 Aug 2004 06:56:12 GMT
Viewed: 
1285 times
  
In lugnet.cad, Steve Demlow wrote:
   This gets me closer to the desired result, but it only lists the parts in each sub-assembly. It does not multiply the parts by the number of times the sub-assembly is referenced, so it still doesn’t produce a complete list of parts.

I also tried the Partslist utility on the same site as MPDWorkshop. It does not recurse into .ldr files and seems to hang on .mpd files.

I just whipped up a program real quick (like half hour quick) that flattens a model. You can download it here:

http://www.halibut.com/~tcobbs/ldraw/LDFlatten.zip

To use it, unzip it, go to a command prompt, and type LDFlatten <filename.ext>, where <filename.ext> is the filename of your main dat file. It will generate a new file called filename-flat.ext, which is a flattened (not MPD) version of your model. You should be able to get accurate part counts out of that file. Given the extremly short time spent on this program, I would strongly suggest copying your model files to a temp directory and running there.

Notes:
  • Doesn’t support MPD; if you have an MPD, use an MPD program to un-MPD it
  • Doesn’t support geometry outside parts; if your model uses any custom parts, they either need to be in the LDraw/Parts directory, or they need a 0 Unofficial Part comment in their header
  • LDraw dir must either be in LDRAWDIR environment variable or set up in the ldraw.ini file in the Windows directory
Let me know what you think. If there is any interest, I might update it to support geometry outside parts and MPD files.

--Travis Cobbs



Message has 1 Reply:
  Re: Complete/recursive parts listings?
 
(...) This worked great. The resulting part counts correlated with some I'd calculated by hand. The only minor snit I observed was that comment lines show up as "(null)", but those were easy enough to strip out. Thanks, Travis, I really appreciate (...) (20 years ago, 23-Aug-04, to lugnet.cad, FTX)

Message is in Reply To:
  Re: Complete/recursive parts listings?
 
(...) This gets me closer to the desired result, but it only lists the parts in each sub-assembly. It does not multiply the parts by the number of times the sub-assembly is referenced, so it still doesn't produce a complete list of parts. I also (...) (20 years ago, 20-Aug-04, to lugnet.cad)

12 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR