trevorsandy / lpub3d

An LDraw™ editor for LEGO® style digital building instructions.
https://trevorsandy.github.io/lpub3d/
130 stars 19 forks source link

MLCad Part unknown! PART line error after mpd file save #734

Closed trevorsandy closed 1 year ago

trevorsandy commented 1 year ago

Subject

After an mpd model file is saved from LPub3D and imported into MLCad, subfile Part name/Description displays Part unknown! versus the subfile description. The part line is flagged red indicating an error.

Messed up file 1

Environment

Version of LPub3D - 2.4.7 Operating system - All

Expected behaviour

The part line should be flagged green and the Part name/Description should display the subfile description.

Actual behaviour

The part line is flagged red indicating an error while the Part name/Description displays Part unknown!

Solution

It looks like MLCad does not like an empty or a blank line after the FILE meta command.

A subfile with an empty line after the FILE command

0 FILE is1.ldr
0
0 Internal structure 1
0 Name: is1.ldr

produces a PART unknown! Part name/Description.

A subfile with a blank line after the FILE command

0 FILE is1.ldr

0 Internal structure 1
0 Name: is1.ldr

produces is1.ldr Part name/Description.

And a subfile without a blank or empty line after the FILE command

0 FILE is1.ldr
0 Internal structure 1
0 Name: is1.ldr

produces Internal structure 1 Part name/Description.

I will change the LPub3D output behaviour to remove the empty line after the subfile FILE meta command.

Cheers,

trevorsandy commented 1 year ago

This behaviour has been corrected.

Messed up file 3

Cheers,