Jeroen Ottens Posted July 6, 2015 Posted July 6, 2015 Hi, This question has probably been answered a thousand times already, but I couldn't find the answer . I want to add a part that consists of multiple parts (in this case the technic universal joint 3L). I have to use the separate subparts to make it connect two axles under an angle. In LPub it now shows up as three different parts instead of one assembly. What do I have to do to make it appear as one part in the instructions? Quote
legolijntje Posted July 6, 2015 Posted July 6, 2015 You can use this piece of "code": 0 !LPUB PLI BEGIN SUB xxxxx.dat yy 0 !LPUB PART BEGIN IGN part.dat part.dat part.dat 0 !LPUB PART END 0 !LPUB PLI END Where xxxxx.dat is the ldraw part number of substituted part (in this case the complete joint, it's somehwere in the library) and yy is the LDraw color of that part. And in the between the BEGIN and END, you can put all the parts which should be ignored (I left the positional info/numbers out of the example, for the sake of simplicity). What this does is, it ignores the parts in between commands and only showes them in the model. The substituted part is what's being shown in parts lists. I use this mainly for joints, electrical stuff (such as wires or motors) and flexible parts (such as flex-axles and belts). EDIT: the same technique is also explained here, but with a different example. Quote
Jeroen Ottens Posted July 6, 2015 Author Posted July 6, 2015 Thanks I was afraid I had to learn ghosting and buffer exchanging for this Quote
1963maniac Posted January 7, 2018 Posted January 7, 2018 I tried the above solution. I created the submodel in MLCAD. In LPUB3D, the PLI appears as unassembled. The assembly is made up of 14 parts. Is that too many? It is not working for me. Quote
roland Posted January 7, 2018 Posted January 7, 2018 On 7/6/2015 at 5:20 PM, legolijntje said: 0 !LPUB PLI BEGIN SUB xxxxx.dat yy 0 !LPUB PART BEGIN IGN part.dat part.dat part.dat 0 !LPUB PART END 0 !LPUB PLI END Is the IGN block really needed as a SUBtitute already implies replacement of the encapsulated parts? Just curious (I' considering adding full LPub support to LDCad 2), also what is the best place for an overview of all the LPub meta's and their syntax? Quote
Philo Posted January 8, 2018 Posted January 8, 2018 13 hours ago, roland said: Just curious (I' considering adding full LPub support to LDCad 2) Good idea ;) 13 hours ago, roland said: also what is the best place for an overview of all the LPub meta's and their syntax? Jaco's tutorials are probably one of the best source for this https://sites.google.com/site/workingwithlpub/ Partly derived from Jaco's work, you can probably find useful stuff in J.C. Tchang documentations ( http://jc-tchang.philohome.com/model/LPub.htm and http://jc-tchang.philohome.com/model/LPub3D.htm) - In French... Quote
legolijntje Posted January 8, 2018 Posted January 8, 2018 14 hours ago, roland said: Is the IGN block really needed as a SUBtitute already implies replacement of the encapsulated parts? Just curious (I' considering adding full LPub support to LDCad 2), also what is the best place for an overview of all the LPub meta's and their syntax? I believe you're right about the IGN block being unnecessary. At least, I didn't use them together in my most recent projects using LPub3D. Quote
Ivan_M Posted January 20, 2018 Posted January 20, 2018 (edited) I have a question regarding this topic. I have an assembly and I want to hide some sub-parts (done correctly) and then I want to show 2 pieces of "complete" part in PLI. I don't know however if I'm doing it right. This is the code from LPUB: 0 !LPUB PLI BEGIN SUB 1 14 -79.547000 -70.000000 70.000000 -1.000000 0.000000 0.000000 0.000000 -0.989776 0.142629 0.000000 0.142629 0.989776 19478-f1.dat 1 14 -79.547000 -70.000000 70.000000 -1.000000 0.000000 0.000000 0.000000 -0.989776 0.142629 0.000000 0.142629 0.989776 19478-f1.dat 0 !LPUB PLI END 0 !LPUB PLI BEGIN IGN 1 0 -79.547000 -70.000000 70.000000 -1.000000 0.000000 0.000000 0.000000 -0.989776 0.142629 0.000000 0.142629 0.989776 19467c01.dat 1 14 -80.000000 -350.000000 110.000000 1.000000 0.000000 0.000000 0.000000 -0.989776 -0.142629 0.000000 0.142629 -0.989776 19466c01.dat 1 14 0.000000 -350.000000 110.000000 1.000000 0.000000 0.000000 0.000000 -0.989776 -0.142629 0.000000 0.142629 -0.989776 19466c01.dat 1 0 0.000000 -70.000000 70.000000 -1.000000 0.000000 0.000000 0.000000 -0.989776 0.142629 0.000000 0.142629 0.989776 19467c01.dat 0 !LPUB PLI END 1 0 -50.000000 -70.000000 70.000000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 62462.dat 1 0 -40.000000 -70.000000 70.000000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 3706.dat 1 16 -45.671900 -179.800000 -50.882000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 submodel group 58 This is working fine but I'm getting parse error due to first line. Is it normal? \\Edit: OK just noticed it is not working at all. The PLI BEGIN SUB line is not working and it just added two pieces of pneumatic cylinders into the build and I didn't notice because they were burried inside. And since they were in build they appeared in PLI. So any advice please how to add 2 pieces into PLI? It is working fine in other parts of BI where I added just one part. Thank you \\Edit 2nd time: Now that was quick, this kind of code works fine: 0 !LPUB PLI BEGIN SUB 19478-f1.dat 14 0 !LPUB PLI END 0 !LPUB PLI BEGIN SUB 19478-f1.dat 14 0 !LPUB PLI END Edited January 20, 2018 by Ivan_M Quote
1963maniac Posted January 24, 2018 Posted January 24, 2018 (edited) I got this to work once, But I have 9 more to do and all I get is errors. Edited January 24, 2018 by 1963maniac incorrect info 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.