djm

Order of part numbers when multiple parts in external ids?

Recommended Posts

Hi,

over at the LDraw forums, there is a discussion going on about using the Rebrickable API to create a cross-system part mapping reference file. I've knocked a script together which queries the Rebrickable API for the parts and then renders it as an XML file partially akin to LEGO's LDD ldraw.xml file.

One of the questions that has come up as a result of processing the data is with regard to a single Rebrickable part being mapped to multiple part ids in an external system (e.g. LDraw, BrickLink, ...), such as seen here. The question is can any meaning be placed on the order in which the external part ids are listed? For example, is the first part which is listed always going to be a more recently generated part, or is the order in which they are listed when there are multiple part ids random?

Regards,

David

Share this post


Link to post
Share on other sites

Hi, David;

As far as I can tell, you can't place any special meaning on the sequence of LDraw mappings.

In case of your example; the 4109602 map is used as both import and export translation; while the 610p01 map is only used as import translation. The image shown is based upon 4109602.dat.

That particular information is not available in the regular csv downloads, and it could be available through the API, but I doubt it.

I could, however, get you a csv file with all Rebrickable's current LDraw mappings, that does contain that information. Let me know if you could use that.

Take care,
Simon

PS I am interested in that discussion... could you provide a link to it?

Share this post


Link to post
Share on other sites
17 hours ago, Simon said:

Hi, David;

As far as I can tell, you can't place any special meaning on the sequence of LDraw mappings.

In case of your example; the 4109602 map is used as both import and export translation; while the 610p01 map is only used as import translation. The image shown is based upon 4109602.dat.

That particular information is not available in the regular csv downloads, and it could be available through the API, but I doubt it.

I could, however, get you a csv file with all Rebrickable's current LDraw mappings, that does contain that information. Let me know if you could use that.

Take care,
Simon

PS I am interested in that discussion... could you provide a link to it?

Hi Simon,

this is the link to the LDraw forum thread.

The script I wrote uses the Rebrickable API, so we can see/process the list of external ids but do not know which is the "best" (very subjective term) one when there are multiple ids. The rule of thumb might be that when there are multiple part ids, we could take the first one in the list. That should at least result in predictable behaviour.

The discussion is at a relatively early stage but the premise is that it would be run periodically although with a reasonable gap (e.g. monthly?) between runs. You would be welcome to contribute to the conversation.

Regards,

David

Share this post


Link to post
Share on other sites

There is no meaning in the order of the output. If there are multiple mappings, there is no priority among them.

Share this post


Link to post
Share on other sites
Posted (edited)

Thanks for that information Nathan.

David

Edited by djm

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now