Specifying a Context 

After a document has been generated, you can add new features to this document by executing another script provided you declare in this other script the document you want to add new features to. This declaration is made by using the context keyword. For more information about this keyword, see context keyword
  1. Re-run The Pocket Calculator scenario.

  2. Enter the script below into the editor (close the editor from before and reopen a new window or delete all the instructions in the current editor).

    context `calc.CATPart/part1/partbody`
    h1 isa Hole (     )
    { Diameter = 4mm; }

    The path specified in the context statement must be surrounded by back quotes.

  3. Position the cursor between the parentheses right after the Hole statement, select Get Feature from the contextual menu then select a point on the calculator (see the figure below for the location of that point). Then click 'Generate'. This is what you get on screen.

The h1 feature is added to the document.