Defining the Context

To create a loop, you need to define the context, that is to say the object (PartBody, Geometrical set, Pad, Relations, Parameters node or any feature) that will contain the items created by the loop. There are 3 different ways to define the context.

Using the Context field
 

To define the context of the loop, you may use the Context field of the Loop edition window.
To do so, click the Context field, and select an object in the specification tree. In the picture opposite, a pad was selected in the specification tree.

Using an existing Document

It is possible to use an existing .CATPart or .CATProduct document.

Using the context keyword

When creating elements that need to be located in different bodies, you can change the context you defined in the Context field and use the Context keyword to define new contexts in the loop body.

 

 

The action script cannot not start with the context keyword because the first context is defined in the Context field.

Sample: KwrLoopMulticontext.CATPart (to launch the loop, activate the loop.)