LDraw.org Discussion Forums
LPub and multi-part parts - Printable Version

+- LDraw.org Discussion Forums (https://forums.ldraw.org)
+-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html)
+--- Forum: LDraw File Processing and Conversion (https://forums.ldraw.org/forum-22.html)
+--- Thread: LPub and multi-part parts (/thread-8959.html)



LPub and multi-part parts - Merlijn Wissink - 2013-04-25

Hi,

I'm relatively new to making instructions with LPub. I did some small models, but nothing more.
I'm now working on a far bigger project for someone else (it's a Technic model with +/- 2200 parts).

But, I discovered a "problem"; multi-part parts (or whatever they're called) like pf-motors. LPub shows all the different parts from the (in this case) xl motor in the parts list and BOM. How can I avoid this? I just want a normal one-piece motor in the parts list and BOM?

I know it's possible, because I've seen it many times in other instructions.


Thanks in advance!
Merlijn / legolijntje


Re: LPub and multi-part parts - Philippe Hurbain - 2013-04-25

You have to use the SUB meta command for that.
Something like

0 !LPUB PLI BEGIN SUB 58121.dat 71
1 16 0 0 110 1 0 0 0 1 0 0 0 1 59154.dat
1 72 0 0 0 1 0 0 0 1 0 0 0 1 59155.dat
1 25 0 0 0 1 0 0 0 1 0 0 0 1 47157.dat
1 0 0 -42 108 0 0 1 -0.707 2.121 0 -0.707 -2.121 0 s\58124s03.dat
0 !LPUB PLI END

See also https://sites.google.com/site/workingwithlpub/advanced-techniques/metacommands/ignoring-parts


Re: LPub and multi-part parts - Merlijn Wissink - 2013-04-25

Well, it works partly. It does add a complete version of the motor to the parts list, but it still lists all the different parts too...
Is it place sensitive (does it matter where I add the code)?


Re: LPub and multi-part parts - Max Martin Richter - 2013-04-25

Please have a look to this webpage: click me ;-)
This should solve your question.

/Max