BrickMonkeyMOCs Posted June 25, 2017 Posted June 25, 2017 When producing instructions from LDraw files using LPub4 I usually use the 'Treat as Part' function for minifigures, contained as submodels within the LDraw MPD file, so that they show up as single parts in the PLI and BOM. However, I sometimes get a parse error in LPub4 when doing this, with the result that the minifigure does not get drawn in the PLI or BOM. Does anyone know what causes this error, or how to fix or avoid it? Quote
legolijntje Posted June 25, 2017 Posted June 25, 2017 Do you use LPub4 or LPub3D? Because if not, I'd recommend you try that one first; LPub3D is a lot better and (especially) a lot faster. Also, if you could paste the bit of code that you (try to) use, that would make it easier for people to help you Quote
BrickMonkeyMOCs Posted June 25, 2017 Author Posted June 25, 2017 (edited) 1 hour ago, legolijntje said: Do you use LPub4 or LPub3D? Because if not, I'd recommend you try that one first; LPub3D is a lot better and (especially) a lot faster. Also, if you could paste the bit of code that you (try to) use, that would make it easier for people to help you Thanks for your reply. The question concerns LPub4. I have LPub3D as well, but I only use it for split-page BOMs, as on my system at least it tends to run a whole lot slower than LPub4. Don't know why that is. Anyway, here's the code from the main model where the minifigure submodels are added... STEP !LPUB MULTI_STEP END !LPUB MULTI_STEP BEGIN !LPUB PLI BEGIN SUB driver front.ldr 19 !LPUB PART BEGIN IGN PART Driver front !LPUB PLI END !LPUB PART END !LPUB PLI BEGIN SUB commander.ldr 19 !LPUB PART BEGIN IGN PART Commander !LPUB PLI END !LPUB PART END !LPUB PLI BEGIN SUB driver rear.ldr 19 !LPUB PART BEGIN IGN PART Driver rear !LPUB PLI END !LPUB PART END STEP In this instance the second figure (commander) is shown in the PLI and BOM but the other two (drivers front and rear) are not. The error message shown from within LPub reads: Parse failed [name of model]:397 0 !LPUB PLI BEGIN SUB driver rear.ldr 19 Edited June 25, 2017 by BrickMonkeyMOCs Quote
legolijntje Posted June 25, 2017 Posted June 25, 2017 13 minutes ago, BrickMonkeyMOCs said: Thanks for your reply. The question concerns LPub4. I have LPub3D as well, but I only use it for split-page BOMs, as on my system at least it tends to run a whole lot slower than LPub4. Don't know why that is. Huh, that is really weird. Do you use LDView as a renderer? LPub3D (well, one of the more recent versions) has made some very significant speed improvements when using LDView as a renderer. Make sure you have checked 'Use multiple files single call rendering' in Preferences -> Rendering -> LDView. Anyway, about your parse error. I haven't tested it, but it could be LPub does't like the whitespace in the name. Try changing the submodel name (and the PLI BEGIN line) to something like driver_rear.ldr and see if it works Quote
BrickMonkeyMOCs Posted June 25, 2017 Author Posted June 25, 2017 10 minutes ago, legolijntje said: Huh, that is really weird. Do you use LDView as a renderer? LPub3D (well, one of the more recent versions) has made some very significant speed improvements when using LDView as a renderer. Make sure you have checked 'Use multiple files single call rendering' in Preferences -> Rendering -> LDView. Anyway, about your parse error. I haven't tested it, but it could be LPub does't like the whitespace in the name. Try changing the submodel name (and the PLI BEGIN line) to something like driver_rear.ldr and see if it works Ah, thanks. That was it. I removed the space and it solved the problem. Initially I had named the submodel 'Driver (front)' and the first solution I tried was removing the parentheses, so I should have thought of removing the space as well! Thanks for the LPub3D tip - I'll have to give that a try too at some point. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.