In this sample, a header containing useful information is written with comments. Message logging to the console is enabled, an analysis is created, a geometry file is referenced, and units are selected:
//
// Examples Guide
//
// The Basic Poppet Valve
//
// Write messages to the screen.
log.showConsole();
// Create new analysis and load CAD model
log.write("Creating new design study...");
creates an analysis object type called “a”; any name can be assigned to the object. This name will be referenced many times through the script:
study = new DesignStudy;
sets the file path to the analysis directory
study.path = C:/models”;
assigns the name of the analysis:
study.name = “poppet-valve”;
loads the geometry file:
study.open(“poppet-valve.x_t”);
sets the length units of the analysis:
study.activeDesign().lengthUnits = “inch-BTU/s”