Adding and Modifying Library Modules
This section contains examples of adding and modifying CSL library modules as part of the implementation of the custom process AbrasiveJet Cut (see Adding a New Process to a Process Group). The first example creates a library that is specific to AbrasiveJet Cut, and contains utilities that contribute to the calculation of feed rates, pierce times, bundle sizes, and expendable tooling costs. The second example adds a cycle-time related formula to the library libAccounting_SheetMetal.csl. This library is shared across processes in the sheet metal process group. Both these libraries are imported by the AbrasiveJet Cut process taxonomy file (see Modifying the Cycle Time Formulas).
This section includes the following subsections:
For more information on CSL, see CSL Language Overview in the chapter Working with Cost Model Logic.
Creating a New Library
Follow these steps to create the new library for AbrasivJet Cut:
-
In the navigation pane, expand Global Cost Model Information, and click Globally Available CSL/Lookup Tables.
-
In the editing pane, click Library CSL.
-
Select Override Object from the Edit menu, or click the override icon,
, in the toolbar. -
Click
near the top or bottom of the editing pane. Information fields for the new library appear at bottom of the editing pane. -
Scroll to the bottom of the editing pane, and replace new with
libAbrasiveJetUtilities.cslin the File Name field. -
Select Save from the File menu, or click
in the toolbar, to save your changes. -
Scroll to the top of the editing pane, and click
next to the name of the new library. An empty CSL module appears in the editing pane. -
Enter the contents of the new library. In real development, you would create the contents from scratch. For the current example, since AbrasiveJet Cut is almost identical to Waterjet Cut, you can copy the contents of
libWaterjetUtilities.csl, and replaceWaterjetwithAbrasiveJetandwaterjetwithabrasiveJet, throughout. -
Select Save from the File menu, or click
in the toolbar, to save your changes. -
To incorporate your changes into the cost model, select Publish Cost Model and Digital Factory from the File menu, or click
in the toolbar.
Modifying a Library Module
Follow the steps below to add an AbrasiveJet Cut cycle time formula to the library libAccounting_SheetMetal.csl. A complete implementation of AbrasiveJet Cut would include similar modifications for several other quantities, such as labor time. labor cost, and direct overhead cost.
-
In the navigation pane, expand Global Cost Model Information, and click Globally Available CSL/Lookup Tables.
-
In the editing pane, click Library CSL.
-
Select Override Object from the Edit menu, or click the override icon,
, in the toolbar. -
In the editing pane, click
next to the name of the new library. The CSL module appears in the editing pane. -
Find the group of formulas whose names start with
GetCycleTime_SheetMetal_(type control-f to search, F3 for next, and Shift+F3 for previous). Add the following formula at the end of the group:
GetCycleTime_SheetMetal_WaterjetCut(processTime, numOperators) = CycleTime0
Note: CycleTime0 is defined in the same library as follows:
CycleTime0 = GetCycleTime(processTime, numOperators)
The function GetCycleTime is defined in libCommonAccounting.csl in terms of processTime:
GetCycleTime(processTime, numOperators) = _
processTime * plant.cycleTimeAdjustmentFactor
The formula processTime is defined in the taxonomy file proper. See Modifying the Cycle Time Formulas.