LDCad Set Inventory PBG file generator


LDCad Set Inventory PBG file generator
#1
I got bored and coded up a generator to make PBG file from Bricklink inventories.

It is very basic.  It translates BL colors to LDraw colors but does no part number validation. I may polish it up in which case I'll move it to an ldraw.org address.

You can find it here:
http://www.pobursky.com/pbggen/pbggen.html

You can download Bricklink set inventories here:
https://www.bricklink.com/catalogDownload.asp

Note: My generator only works with tab delimited files not XML.
Reply
RE: LDCad Set Inventory PBG file generator
#2
Ha Orion!

You know what is funny? I just created a tutorial (in Dutch for my website Binarybricks) on how to do this manually using the files from either Bricklink or Brickset and use an Excel template.
You work make things much easier :-)

Is it OK to refer to your tool on my website?
Though I dedicate the site to the Dutch audience, I think I can explain how to use it.

Thanks!
Jaco van der Molen
lpub.binarybricks.nl
Reply
RE: LDCad Set Inventory PBG file generator
#3
Go ahead. Just be aware that it does not translate any discrepancies between LDraw and BL part numbers. It only translates color numbers. There may be other bugs since I only tested it on 2 inventories.
Reply
RE: LDCad Set Inventory PBG file generator
#4
(2016-10-27, 16:46)Orion Pobursky Wrote: Go ahead. Just be aware that it does not translate any discrepancies between LDraw and BL part numbers. It only translates color numbers. There may be other bugs since I only tested it on 2 inventories.
Tried it today on 3184 - Adventure Camper. Worked great - apart of course for the database discrepancies between BL and LDraw. Very useful nonetheless!
Reply
RE: LDCad Set Inventory PBG file generator
#5
(2016-10-27, 18:11)Philippe Hurbain Wrote: Worked great - apart of course for the database discrepancies between BL and LDraw.

And fixing that problem will be very time intensive. The BL parts list is 45000 entries. It can be done but I don't have the time right now. I am, however, think about putting the translations into a database (as opposed to hard coded) that a front end could be built to allowed trusted people to edit.
Reply
RE: LDCad Set Inventory PBG file generator
#6
I just realized that my generator doesn't translate rubber colors.  I'll fix this soon
Reply
RE: LDCad Set Inventory PBG file generator
#7
(2016-10-27, 19:34)Orion Pobursky Wrote:
(2016-10-27, 18:11)Philippe Hurbain Wrote: Worked great - apart of course for the database discrepancies between BL and LDraw.

And fixing that problem will be very time intensive. The BL parts list is 45000 entries. It can be done but I don't have the time right now. I am, however, think about putting the translations into a database (as opposed to hard coded) that a front end could be built to allowed trusted people to edit.

Why build a new database when Rebrickable already has quite an extensive mapping between Bricklink and LDraw numbers? Kinda waste of time in my opinion...
Rebrickable does have an API, maybe you could use that?
Reply
RE: LDCad Set Inventory PBG file generator
#8
(2016-10-30, 14:00)Merlijn Wissink Wrote: Why build a new database when Rebrickable already has quite an extensive mapping between Bricklink and LDraw numbers? Kinda waste of time in my opinion...
Rebrickable does have an API, maybe you could use that?

While good for now, Rebrickable is neither LDraw nor BL affiliated. This means any updates to either colors or the library would take some trickle down time. We've tried in the past to sync BL with LDraw numbering but the BL admins didn't want to collaborate.
Reply
RE: LDCad Set Inventory PBG file generator
#9
(2016-10-30, 14:00)Merlijn Wissink Wrote: Why build a new database when Rebrickable already has quite an extensive mapping between Bricklink and LDraw numbers? Kinda waste of time in my opinion...
Rebrickable does have an API, maybe you could use that?

I just did a few test cases with the Rebrickable API. The biggest problem I found is that Rebrickable will only return a part if said part is in a set that Rebrickable has inventoried. I did a couple of test sets and the hits were spotty at best.
Reply
RE: LDCad Set Inventory PBG file generator
#10
In my experience Rebrickable is by far not as Bricklink in terms of communication and cooperation. I mean, I had some contact with the 'owner' of Rebrickable a while ago and the new version of Rebrickable might even get a native exporter to LDcad's .pbg files. 

Also, regarding the 'trickle down time', I don't think it's that bad. They have a reasonable amount of admins and when you inform them of a missing LDraw number (or color, or Bricklink number or any other number for that matter), it's often added within 24 hours.
Reply
RE: LDCad Set Inventory PBG file generator
#11
(2016-10-30, 18:19)Orion Pobursky Wrote: I just did a few test cases with the Rebrickable API. The biggest problem I found is that Rebrickable will only return a part if said part is in a set that Rebrickable has inventoried. I did a couple of test sets and the hits were spotty at best.

What do you mean exactly? Isn't it quite logical that it doesn't return parts that aren't in inventories, because that would mean they probably don't exist. Or do I understand you incorrectly?
Reply
RE: LDCad Set Inventory PBG file generator
#12
(2016-10-31, 7:47)Merlijn Wissink Wrote:
(2016-10-30, 18:19)Orion Pobursky Wrote: I just did a few test cases with the Rebrickable API. The biggest problem I found is that Rebrickable will only return a part if said part is in a set that Rebrickable has inventoried. I did a couple of test sets and the hits were spotty at best.

What do you mean exactly? Isn't it quite logical that it doesn't return parts that aren't in inventories, because that would mean they probably don't exist. Or do I understand you incorrectly?

Take this part:
http://www.bricklink.com/v2/catalog/cata...=3040pb001

If you search rebrickable for 3040pb001 you get nothing despite the fact that this is an official LDraw part. The reason, I think, is that the set that it appears in isn't in the Rebrickable database and therefore the part has never been added. This also applies to new parts from new sets. They are listed on Bricklink no but not on Rebrickable. 

Rebrickable is good tool and I'll probably update the script to use it but there are limitations.
Reply
RE: LDCad Set Inventory PBG file generator
#13
(2016-10-31, 17:49)Orion Pobursky Wrote: Take this part:
http://www.bricklink.com/v2/catalog/cata...=3040pb001

If you search rebrickable for 3040pb001 you get nothing despite the fact that this is an official LDraw part. The reason, I think, is that the set that it appears in isn't in the Rebrickable database and therefore the part has never been added. This also applies to new parts from new sets. They are listed on Bricklink no but not on Rebrickable. 

Rebrickable is good tool and I'll probably update the script to use it but there are limitations.

That set is available on Rebrickable and the inventory leads me to this part: http://rebrickable.com/parts/3040p05

I think the reason you weren't able to find it with 3040pb001 is because the Bricklink number is listed as 3040pb01 on Rebrickable. It used to be that number in the past, but Bricklink changed all of their patterned part numbers last year. Like you can see here for the part in this case.

I actually stumbled upon this problem a little while ago, but then forgot about it again. Nice reminder!  Wink 
I'll see if I can notify the admins at Rebrickable about this (relatively 'widespread') problem.
Reply
RE: LDCad Set Inventory PBG file generator
#14
As an easy update... the generator could ask for the set number and automatically fill in the caption/description/picture fields Wink
Reply
RE: LDCad Set Inventory PBG file generator
#15
(2016-10-30, 5:34)Orion Pobursky Wrote: I just realized that my generator doesn't translate rubber colors.  I'll fix this soon

Disregard this.  Bricklink does not have separate colors for rubber parts.
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 1 Guest(s)