Jeroen Ottens

How to make an assembly of parts show up as one part in LPub

Recommended Posts

Hi,

This question has probably been answered a thousand times already, but I couldn't find the answer :cry_sad:.

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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 by Ivan_M

Share this post


Link to post
Share on other sites

Here is how i deal with this "problem".

I remove the involved parts (in this case 62520.dat X2 and 62519.dat X1) from the PLI and put over the PLI a picture of the complete assembly (mimicking perfectly a PLI).

In the case other parts than 62520 and 62519 are involved in the step, i include them in the picture to.

Share this post


Link to post
Share on other sites

I got this to work once, But I have 9 more to do and all I get is errors.

 

Edited by 1963maniac
incorrect info

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.