LDraw.org Discussion Forums
How to save comprehensive parts list for multiple models? - Printable Version

+- LDraw.org Discussion Forums (https://forums.ldraw.org)
+-- Forum: General (https://forums.ldraw.org/forum-12.html)
+--- Forum: Help (https://forums.ldraw.org/forum-13.html)
+--- Thread: How to save comprehensive parts list for multiple models? (/thread-2120.html)

Pages: 1 2 3 4


IMHO, we should keep it as simple as possible - Steffen - 2011-12-08

well, I was thinking of something very, very, very simple.
actually, the mpd file already carries all needed information,
just in a non-accumulated way.
so probably json is a little overkill, since it re-invents what mpd already is.

the csv, accumulating the part counts, however, could be used in creating statistics, inventories, etc.
http://www.peeron.com/inv/sets/7740-1

for this purpose, a simple accumulation by counting parts would be sufficient IMHO:
a simple sequence of lines, each line consisting of
count;part_number;color;comment
, the last element being optional. So, a model consisting of
1x part 4083 in black,
28x part 3005 in yellow,
28x part 3005 in red
would have this csv representation:

1;4083;0
28;3005;14
28;3005;4

actually, it is not really "comma-separated", but instead "semicolon-separated",
but that variant in many programs is understood. maybe the tool can have an option for choosing the separation char.
we could also use

1,4083,0
28,3005,14
28,3005,4

, or we could use the filename instead of the part number:

1,"4083.dat",0
28,"3005.dat",14
28,"3005.dat",4

please consider all this just as an inspiration.
Having such a tool would prevent set inventories sites
from having to invent an own, proprietary format again and again.


Re: Brickforge - Steffen - 2011-12-08

can BrickForge import *.mpd / *.ldr / *.dat files?


Re: Brickforge - Jean-Philippe Ouellet - 2011-12-08

[Image: Dpb51.png]

Wouldn't have brought it up if it didn't. Tongue


Re: Brickforge - Orion Pobursky - 2011-12-08

Interesting but it crashes when I try to open files. I'm going to try and build from the source and see if the problem persists.


Re: Brickforge - Orion Pobursky - 2011-12-08

OK, you can't build it from source since QSA hasn't been available since 2008 Sad


Re: IMHO, we should keep it as simple as possible - Greg Teft - 2011-12-08

This was actually going to be one of the first chores for my parser when i get there!
My first iteration took a root ldr and read down through all of the placements.
It doesn't support mpds - I'm actually working out how to do that now.

I have a prototype, no guarantees are given, it uses dialogs (prompts on the title bar), and prints messages to a console.
If you'd like to try it you can download from http://home.comcast.net/~greg.teft/
If you don't need to see the additional messages, just double click on the jar - you need a current java 6 runtime or later.
To run in console/command prompt, just run "java -jar QuickPartLister.jar".

attached is output for my Eiffel Tower (I have not checked it for accuracy yet).


Re: Brickforge - Derek - 2011-12-08

Jean-Philippe, Brickforge for some reason doesn't like some of my files. They don't import properly. Also, can I buy legos through brickforge, or will it just make me an awesome list?


Re: BrickStore - Jean-Philippe Ouellet - 2011-12-08

Specifically which parts?
Can you post the model?


As for buying parts...

According to the page I linked to it can.

I believe the process would be to import the model, and Export > "BrickLink Wanted List XML to Clipboard"

I just tried it now to be sure and it seems to work, but I would need to remember my bricklink password to actually test it.

I remember doing it a long time ago for this little desk placard thing. It worked flawlessly except that I couldn't find a 3482 in black (not sure they even exist). Sorry I can't give you an exact procedure, but I assure you that it's possible.


Side-note: I just realized I referred to the software as BrickForge. This is not its name. To avoid any possible confusion, the software is called BrickStore, it originates on the website brickforge.de. My mistake.


Re: BrickStore - Derek - 2011-12-10

Jean-Philippe-
When I imported this, it only imported the first .ldr file, and not all the pieces. This .mpd contains one of each .ldr that I plan to construct (although the actual list will include multiples of certain models). Maybe you have more success? Is there another parts inventory that BrickStore uses that I can import?

Thanks,
Derek


Re: BrickStore - Jean-Philippe Ouellet - 2011-12-10

That is expected behavior. Only the first model is supposed to be loaded, the other models should only be loaded if they are referenced from the first model. See the OMR spec for a more detailed explanation.

I believe the proper thing to do would be to insert one submodel at the top which just contains references to each other model in the MPD you wish to include. However, some of your submodels have the same file name which will definitely cause trouble. I started to rename them, but then realized that if your MPD is fairly conventional (no wacky meta commands) and assuming you want exactly one of each model in the MPD, then removing every line that is not a part should yield a proper parts list. I did not throughly inspect your MPD (it was quite long, props for the hard work) and compare it to the parts list, but I see no immediately evident reason why it would be incorrect.

Even though I believe the attached model generates an accurate parts list, I would suggest getting a 2nd opinion from someone more experienced than I before purchasing the parts.

Regardless of the above, there are still 23 parts unrecognized by BrickStore (at least on my system) which will need to be manually "Fixed" to get the correct item type for BrickLink.

Hope this helps.