The Editor Tools window provides code for common model operations (for example, setting all nondefault properties of a feature) and options to create applicable form objects corresponding to a model operation.When you work in a method editor, you can insert the code at the cursor position in a method editor window. Right-click on a tree node in the Editor Tools window and choose among the different actions, click one of the corresponding buttons underneath the tree, or double-click to insert the top action on the tree node’s context menu.
• Choose Get () to insert code to get the value of a parameter, property, or filename (for example, model.param().get("w") or model.geom("geom1").feature("r1").getDouble("rot")), or to insert a reference to the feature (for example, model.geom("geom1").feature("r1")).
• Choose Set () to insert code to set the value of a parameter, property, or filename (for example, model.param().set("w", 0); or model.geom("geom1").feature("r1").set("rot", "0");).
•
• Choose Create () to insert code to create the feature (for example, model.geom("geom1").create("r1", "Rectangle");).
•
• Choose Enable () or Disable (
) to insert code to enable or disable the feature (for example, model.geom("geom1").feature("r1").active(true); to enable that feature).
• Choose Edit Node () to select that node under the Model branch in the main desktop’s Application Builder window and open its Settings window for editing. You can also click the Edit Node button (
) at the top of the Editor Tools window.
• Choose Input () to insert a Text Label, an Input Field, and (if applicable) a Unit object to display the name and an input field for a model parameter or a variable under Declarations.
• Choose Output () to insert a Text Label and a Data Display object to display the name and value of a model parameter or variable, or for a variable under Declarations.
•
• Choose Button () to insert a Button object for a file or view command or to create a report, for example.