Here is a very quick and dirty model that uses the Remove Group meta from LPub and can remove MLCad grouped bricks from any step.
Code:
0 Author: Jaco van der Molen
0 !LICENSE Free for non-commercial use.
0 !LPUB MULTI_STEP BEGIN
0 ROTATION CENTER 0 0 0 1 "Custom"
0 ROTATION CONFIG 0 0
1 4 0 0 0 1 0 0 0 1 0 0 0 1 3894.dat
1 0 40 10 -10 0 1 0 0 0 1 1 0 0 2780.dat
1 0 -40 10 -10 0 0 -1 0 1 0 1 0 0 2780.dat
0 STEP
0 MLCAD BTG A
1 2 80 0 -20 1 0 0 0 1 0 0 0 1 3894.dat
0 MLCAD BTG A
1 0 120 10 -30 0 0 -1 0 1 0 1 0 0 2780.dat
0 GROUP 2 A
0 STEP
0 !LPUB PLI CONSTRAIN LOCAL HEIGHT 3.24
0 MLCAD BTG B
1 14 160 0 -40 1 0 0 0 1 0 0 0 1 3894.dat
0 MLCAD BTG B
1 0 200 10 -30 0 0 -1 0 1 0 1 0 0 2780.dat
0 GROUP 2 B
1 1 -50 -50 -20 0 1 0 1 0 0 0 0 -1 3702.dat
0 BUFEXCHG A STORE
0 MLCAD ARROW 1 160 -56 -40 1 0 0 0 1 0 0 0 1 16 6 12 40 0 50 2 0 0 0
0 MLCAD SKIP_BEGIN
3 0 148 -56 -40 160 -64 -40 160 -48 -40
4 0 160 -59 -40 164.901 -58.7592 -40 164.313 -52.7881 -40 160 -53 -40
4 0 164.901 -58.7592 -40 169.755 -58.0393 -40 168.584 -52.1546 -40 164.313 -52.7881 -40
4 0 169.755 -58.0393 -40 174.514 -56.847 -40 172.773 -51.1054 -40 168.584 -52.1546 -40
4 0 174.514 -56.847 -40 179.134 -55.194 -40 176.838 -49.6507 -40 172.773 -51.1054 -40
4 0 179.134 -55.194 -40 183.57 -53.0961 -40 180.741 -47.8045 -40 176.838 -49.6507 -40
4 0 183.57 -53.0961 -40 187.779 -50.5735 -40 184.445 -45.5847 -40 180.741 -47.8045 -40
4 0 187.779 -50.5735 -40 191.72 -47.6505 -40 187.913 -43.0125 -40 184.445 -45.5847 -40
4 0 191.72 -47.6505 -40 195.355 -44.3553 -40 191.113 -40.1127 -40 187.913 -43.0125 -40
4 0 195.355 -44.3553 -40 198.651 -40.7197 -40 194.012 -36.9133 -40 191.113 -40.1127 -40
4 0 198.651 -40.7197 -40 201.573 -36.7785 -40 196.585 -33.4451 -40 194.012 -36.9133 -40
4 0 201.573 -36.7785 -40 204.096 -32.5698 -40 198.805 -29.7415 -40 196.585 -33.4451 -40
4 0 204.096 -32.5698 -40 206.194 -28.1342 -40 200.651 -25.8381 -40 198.805 -29.7415 -40
4 0 206.194 -28.1342 -40 207.847 -23.5142 -40 202.105 -21.7725 -40 200.651 -25.8381 -40
4 0 207.847 -23.5142 -40 209.039 -18.7545 -40 203.155 -17.584 -40 202.105 -21.7725 -40
4 0 209.039 -18.7545 -40 209.759 -13.9009 -40 203.788 -13.3128 -40 203.155 -17.584 -40
4 0 209.759 -13.9009 -40 210 -9 -40 204 -9 -40 203.788 -13.3128 -40
0 MLCAD SKIP_END
0 STEP
0 BUFEXCHG A RETRIEVE
0 !LPUB REMOVE GROUP "A"
0 !LPUB REMOVE GROUP "B"
0 !LPUB PLI BEGIN IGN
1 2 30 -30 -20 0 1 0 -1 0 0 0 0 1 3894.dat
1 14 0 -60 -40 -1 0 0 0 -1 0 0 0 1 3894.dat
1 0 40 -70 -30 0 0.5 0.866 0 -0.866 0.5 1 0 0 2780.dat
1 0 -40 -70 -30 0 0.5 0.866 0 -0.866 0.5 1 0 0 2780.dat
0 !LPUB PLI END
0 STEP
0 !LPUB MULTI_STEP END
0
The green technic 1x6 brick and one pin is group A
Code:
0 MLCAD BTG A
1 2 80 0 -20 1 0 0 0 1 0 0 0 1 3894.dat
0 MLCAD BTG A
1 0 120 10 -30 0 0 -1 0 1 0 1 0 0 2780.dat
0 GROUP 2 A
Every brick in the group should be preceeded by
0 MLCAD BTG A (where A is the group name and can be any name)
After the last brick in the group you should end with a line that says how many bricks are in the group
0 GROUP 2 A
The yellow brick with a pin is group B in the same way.
In the last steps both these groups are removed from the model.
You can then place the bricks in the right position but should be ignored from the PLI (and BOM) using
Code:
0 !LPUB PLI BEGIN IGN
all bricks to be ignored
0 !LPUB PLI END
A buffer exchange is used to remove the arrow.
Study the code and model to understand!
You can code groups by hand but I still use MLCad for that.
Bricks in a group do not necessarily need to be in line but it will make things clear, so it is good practice to end a step with all bricks grouped that later need to be removed.
You can also use a submodel and create a group with only that submodel in it (basicaly a group containing one "brick / submodel") and remove that somewhere in the model instructions.
If you want help with your real model, let me know and mail me the model.