LDraw.org Discussion Forums

Full Version: How to save comprehensive parts list for multiple models?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
I want to take multiple models in one file (6 of this, 3 of that, etc) and save a big old master parts list that doesn't break it down by model, so that I can buy them all at once. This is a bunch of miniature game pieces that someone designed, and I want to buy enough to play a game with. The problem is that when I save a parts list, it's just one of every model and none of the parts are consolidated (lots of similar parts). Also, I would have to go in and manually edit the parts list by multiplying pieces by how many I need, ad nauseam. I was doing this, until 3/4 of the way through I realized I'd marked a color improperly, and had to generate all new parts lists. Can anyone help me out?

For simplicity's sake, let's say I have 50 different models.
I need 6 of some, 3 of some, 4 of some, and 5 of some others, while only 1 of a few of them. I want a master parts list, all consolidated, that I can use for ordering parts.
When I was creating peeron.org part lists some years ago,
I used to simply create mpd file of the model.

I think mpd would also be the file format of your choice here.

The only thing missing is probably a tool which takes an mpd file as input and converts it to a csv
(which I suggest because it is so highly portable) parts list...


I don't know of such a tool yet.
I can help you but the instructions depend on what LDraw editor you are using. If you give me that info, I'll whip up a tutorial.
I'm using MLcad, and my file is already an mpd. I'd love a tutorial!
I've been missing such a tool for long already.

I don't want to use some other "bigger" tool like an editor (Mlcad) or viewer (LDView) to do that conversion.

Having such a tool available would offer the possibility at peeron.com to allow the upload of *.mpd files,
instead of having to convert to some peeron-proprietary set inventory format.
But what about the extra parts that come in the box but aren't part of the model?

Would the MPD not be an actual model of the set but just a collection of the correct type/color/count of the parts that come in the box, not organized into a proper model?

How do you want parts of the same type but different color represented?

"part number", color_code, number_of_parts
"same part number", different_color_code, number_of_parts_of_the_other_color
"different part number", color_code, number_of_parts
be what you're looking for?

For example, for this MPD:
0 FILE some-model
1 1 10 -32 10 1 0 0 0 1 0 -0 0 1 3024.dat
1 1 0 0 0 1 0 0 0 1 0 -0 0 1 some-submodel
0 FILE some-submodel
1 4 0 0 0 1 0 0 0 1 0 -0 0 1 3001.dat
1 2 -10 -24 0 1 0 0 0 1 0 -0 0 1 3002.dat

Would you be looking for something like this?
"3001", 4, 5
"3001", 1, 2
"3024", 2, 1

Would you prefer the output in JSON because it could represent a hierarchy of the submodels within the parts as well?

If I remember correctly, LDView's code for generating the HTML parts list didn't rely too heavily on previous processing of the model, so I think most of the work is pretty much done already. (At least for CSV or any other flat format.)
couldn't it just be like the regular parts list says?

number - color - part no. - part name
or something like that?
All I wanted was a list that combined all sub-model's parts into one, without breaks or sections for each model.
If the end goal is to buy the parts, are you aware of Brickforge

I believe it does what you want, and it can even generate XML that can be bulk-uploaded directly to bricklink to make it easier to buy exactly the parts you need.

I'm not proposing this as the Peeron solution, but rather a solution for Derek.
> But what about the extra parts that come in the box but aren't part of the model?

IMHO, that can be decided by the mpd author:
if that should be wanted, he can create a mpd consisting of 2 portions: the model and the spare parts.

> couldn't it just be like the regular parts list says?
> number - color - part no. - part name

IMHO, that would create a new proprietary file format.
Maybe a converter tool can offer various output formats:
(a) csv
(b) json
© txt

You probably want ©.

after some more consideration and reading the other replies in this thread, I figured 2 more things:
one is: maybe XML is missing in that list. But which scheme to use?
When thinking some more, both JSON and XML will be a re-implementation of everything that MPD already
is, just in another proprietary syntax. Just using simple CSV will be so universal that you can edit it with
existing calculation programs like LibrOffice or Excel, and sites like peeron could be using that format.
Would we invent a new json hierarchy, or support various XML schemes x, y, z, etc.,
we would re-invent the wheel of MPD actually.
How would you CSV it? Specifically what data would you CSV and in what order?
Pages: 1 2 3 4