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.
To define the context of the loop, you may use the
Context field of the Loop edition window. |
It is possible to use an existing .CATPart or .CATProduct document.
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.)