Remove Group

LPub offers an alternative to the MLCad native Buffer Exchange command with the metatag !LPUB REMOVE GROUP "groupname". Using buffer exchange you can only remove parts from a step preceding the step where you reposition the buffed parts. LPub can remove parts in groups from any previous steps in any step that comes after that step. A good example where you would use this is when working with electric cables.
If you have say an NXT cable as part of a robot but you cannot hook up both ends because more of the robot needs to be built, you can connect the cable and leave it straight and then later (has to be within the same file), remove that version of the cable in and put in another (but to the user it just looks like you simply bent the cable).  If you put the first instance of the cable in an MLCad group, then LPub can remove that group in a specific step, but unlike buffer exchange, it doesn't have to be the very next step. 

Create a group

You can do this best in MLCad for every part in a group has to be preceeded by the MLCad metacommand MLCAD BTG GroupName. Doing this manually would take a lot of effort with larger groups.
Select the elements you want to group and click the Group icon or press Ctrl+G. Give the group a name. The name should be unique.
Please note that elements in a group should all be part of the same step in the model. If you group elements in different steps alle elements will end up in the step of the last element you selected.

Example code:
0 MLCAD BTG GroupName
1 x y z 0 1 0 0 0 1 0 0 0 1 part.dat
0 MLCAD BTG GroupName
1 x y z 0 1 0 0 0 1 0 0 0 1 part.dat
0 GROUP 2 GroupName
Where 2 is the amount of parts in the group.

The LPub metacommand to remove the group "GroupName" in any step after that group you would use:
This command should be placed below the 0 STEP command of the step where you wish to remove the group.