LDraw.org Discussion Forums
Compatibility issue in MPD submodel file names between MLCad and Bricksmith - Printable Version

+- LDraw.org Discussion Forums (https://forums.ldraw.org)
+-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html)
+--- Forum: LDraw Editors and Viewers (https://forums.ldraw.org/forum-11.html)
+--- Thread: Compatibility issue in MPD submodel file names between MLCad and Bricksmith (/thread-8973.html)



Compatibility issue in MPD submodel file names between MLCad and Bricksmith - Philippe Hurbain - 2013-04-29

A friend who uses Bricksmith sent me a mpd, that I returned him after some changes using MLCad. After that, Bricksmith complained that "submodels are not available". A check of MPD before and after my changes, showed that there was a capitalization issue.
Here is the header of one submodel:
Code:
0 FILE righttrack.ldr
0 Right track assembly
0 Name: RightTrack.ldr
Bricksmith refers to this submodel as
Code:
1 495 -480 104 59 -1 0 0 0 1 0 0 0 -1 RightTrack.ldr
but it seems that MLCad uses only file field as reference, and silently changes this line to
Code:
1 495 -480 104 59 -1 0 0 0 1 0 0 0 -1 righttrack.ldr
...and now Bricksmith is lost!

Any solution?


Re: Compatibility issue in MPD submodel file names between MLCad and Bricksmith - Allen Smith - 2013-04-29

Could you post the entire file which is causing problems? I can't reproduce this issue as described, and the MPD lookup code has been case-insensitive since Bricksmith 1.0 in 2005.


Re: Compatibility issue in MPD submodel file names between MLCad and Bricksmith - Roland Melkert - 2013-04-29

I think MLCad does it the right way.

But in the end Bricksmith should still be able to find the submodel, cause references should be handled case insensitive (even on a *nix fs). This is needed because loads of official parts use wrong casing in type 1 lines.

Just my 2cts Smile


Re: Compatibility issue in MPD submodel file names between MLCad and Bricksmith - Philippe Hurbain - 2013-04-29

Well... the entire file is still kind of confidential (EV3 stuff). I'll see with my friend if we can reproduce the problem on a vanilla file Wink


Re: Compatibility issue in MPD submodel file names between MLCad and Bricksmith - Michael Heidemann - 2013-04-29

I do not have Bricksmith here, but I can reproduce the change of the type 1 line.
Test_Start.mpd is build like Philo stated.
Test_End.mpd is the saved version after i changed the color.
Maybe this little example helps to verify what happened.

I also tried without changing anything, but only save under a new name and the same result.
MLCad (version 3.40) uses the entry from the '0 FILE' line for the reference. That is good IMHO. We had several discussions about the '0 Name:' entry and the result was in any case that nothing should depend on that entry!


Re: Compatibility issue in MPD submodel file names between MLCad and Bricksmith - Travis Cobbs - 2013-04-29

I agree on both points above points. The 0 FILE line contains the official filename. So all lower case is the official filename. And MPD file lookup probably shouldn't be case-sensitive, because no other filename lookups in LDraw files are case-sensitive.


Re: Compatibility issue in MPD submodel file names between MLCad and Bricksmith - Allen Smith - 2013-04-29

The race to advocate correct behavior is a bit premature, considering Bricksmith already does what is being advocated. This file opens with no errors:
Code:
0 FILE righttrack.ldr
0 Right track assembly
0 Name: RightTrack.ldr
1 4 0 0 0 1 0 0 0 1 0 -0 0 1 3001.dat
0 NOFILE
0 FILE test.ldr
1 495 -480 104 59 -1 0 0 0 1 0 0 0 -1 righttrack.ldr
0 NOFILE
As I said, Bricksmith's submodel lookup has been case-insensitive for the entire length of the software's existence. Obviously there's something else going on here. Without seeing the file itself, I don't know what that might be.