Adding a Setup Option—Using List Mode to Access a Lookup Table
This section contains an example of adding a setup option that allows the user to select from a list of values that are based on a lookup table. The example uses the custom process, AbrasiveJet Cut, which is copied from Laser Cut, and is almost identical to Waterjet Cut (see Adding a New Process to a Process Group). Following Waterjet Cut, this new process will include a setup option, nozzleType, that allows the user to specify a the type of nozzle in use for the current part. The nozzle characteristics affect part cost, and are contained in a lookup table (see Adding Lookup Tables). The lookup table is accessed by the process taxonomy module.
Follow these steps to create the setup option:
1 In the navigation pane, double-click AbrasiveJet Cut; in the editing pane, click the Process Setup Optoins tab.
In this example, the process is new, and so is editable without an explicit override. For inherited objects, you must select Override Object from the Edit menu, or click the override icon, green_dude.png, in the toolbar.
2 Scroll to the bottom of the editing pane, and click green_plus.png. Text boxes and a table for a new setup option appear.
The table will define the end-user input mode, LIST mode, which provides a list of alternative values from which the user can choose. The alternatives are specified by a select expression (that is, a CSL query expression--see CSL Language Overview in the chapter Working with Cost Model Logic) that queries a lookup table. There will be one alternative for each lookup table entry.
3 Add a line to the table, specifying the following column values:
o Mode Name: UserOverride
o Type: List
o Display Text: Nozzle Type
o Expression: select k.nozzleType from tblAbrasiveJetAbrasiveNozzle k order by k.nozzleCost asc
o Default Value: ‘Mid-Life Composite Carbide’
4 Enter the following information into the text boxes:
o Name: nozzleType
o Default Mode Name: UserOverride
pso_nozzle_type.png
5 Select Save from the File menu, or click save_icon.png in the toolbar, to save your changes.
6 To incorporate your changes into the cost model, select Publish Cost Model and VPE from the File menu, or click publish_icon.png in the toolbar.
For more information on CSL, see CSL Language Overview in the chapter Working with Cost Model Logic.