Using Buffer exchange

Buffer exchange commands are easily done in MLCad. The basic code of Buffer exchange looks like this:

0
- Model, parts and steps
0 STEP
- Other parts for this step
0 BUFEXCHG A STORE
1 c x y z 1 0 0 0 1 0 0 0 1 part.dat (hovering over model)
0 MLCAD ARROW (pointing to where the part has to go)
0 STEP
0 BUFEXCHG A RETRIEVE
1 c x y z 1 0 0 0 1 0 0 0 1 part.dat (in correct place)
- Other parts for this step
0 STEP
- Rest of model and steps
0


Start by working your way through the model in LPub. Once you reach the step where the Submodel is added you should turn to the next page and see the first step of the Submodel on a new page. Continue to lay out the instructions for the Submodel by adding the steps. When you finish laying out the page for the Submodel turn to the next page. If you properly coded the Buffer exchange you should see the completed Submodel hovering over the model with one or more arrows pointing to where the Submodel should go. Add the next step. You should see the Submodel placed in the correct position and you can now continue to work laying out the rest of the instructions.

Your model tree hierarchy in LPub should look like this:

- Model, parts and steps
0 STEP
- Perhaps some other parts for this step
0 BUFEXCHG A STORE
1 c x y z 1 0 0 0 1 0 0 0 1 Submodel.ldr (hovering over model)
0 MLCAD ARROW (pointing to where the Submodel has to go)
0 STEP
0 BUFEXCHG A RETRIEVE
1 c x y z 1 0 0 0 1 0 0 0 1 Submodel.ldr (in correct place)
- Other parts for this step
0 STEP
- Rest of model and steps