transform_create
Create an IC-CAP Transform with its function type and program content in one call, supporting PythonLocal, PEL, Equation, built-in extraction, and Optimize types.
Instructions
Create a Transform and optionally set its Function type and Program content in one call.
ORDERING: Transforms may be created before or after setup_import_mdm — both orders are supported (live-verified 2026-09-02). Engineer PEL programs conventionally start with an UPDATE_AUTO line, which makes the transform auto-execute on creation; with data already imported, that execution runs against real data.
TRANSFORM TYPES AND THEIR SYNTAX REQUIREMENTS:
PythonLocal - Python script. Use transform_type='PythonLocal', program=''. Example: transform_create(transform_type='PythonLocal', program='print("hello")')
PEL/Program - IC-CAP PEL script. Use transform_type='PEL', program=''. WARNING: PEL uses
returnstatement to output data. Direct assignment likebeta = ic/ibcauses parse error "Direct assignment to the data set beta is not allowed. Use the RETURN statement." Correct:return ic/ib. WRONG:beta = ic/ib. Example: transform_create(transform_type='PEL', program='return ic/ib')Equation - Simple mathematical expression. Use transform_type='Equation' (or check funcdict for available types). Equations are evaluated directly; no return statement is needed. Note: IC-CAP requires lowercase 'equation' as function type; the handler auto-maps 'Equation' to 'equation'. Equation content is stored in the 'Input' field (NOT 'Program'); the handler handles this automatically. Example: transform_create(transform_type='Equation', program='ic/ib')
Built-in - IC-CAP built-in extraction functions (e.g. BJTDC_is_nf, BJTDC_fwd_gummel, PNCAPsimu, RBBcalc). Use transform_type=''. Function is set automatically. Built-in transforms require table fields to be filled (data references to other setups/transforms). Inspect the transform's table fields with tablevar_get and consult the installed IC-CAP documentation for required fields. Example: transform_create(transform_type='BJTDC_is_nf') Then fill table fields: tablevar_set('/path/to/transform/Forward VC', 'fearly/vc')
Optimize - Optimization transform. Use transform_type='Optimize'. Configure it with optimizer_setup or with transform_set_optim_field for individual fields. Example: transform_create(transform_type='Optimize') Then: optimizer_setup(transform_path='/path/to/optimize', ...)
Malformed transform types, programs, or fields can leave IC-CAP unresponsive. Always verify the created transform with transform_get_function.
Creating a Transform onto a name a Plot already uses creates a name conflict: the result then carries a warning (the Transform is never auto-renamed), and Plot-side field access afterwards requires object_type='Plot'. Prefer distinct names for new objects.
Consult the IC-CAP documentation installed with your licensed software for model- and version-specific transform fields.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| program | No | Program script content. For PEL: MUST use 'return' statement, NOT direct assignment. For PythonLocal: standard Python code. For Equation: mathematical expression without return. | |
| function | No | Legacy alias for program parameter | |
| overwrite | No | Delete and replace an existing Transform only when explicitly enabled | |
| transform_path | Yes | Transform path, e.g. '/model/dut/setup/my_transform' | |
| transform_type | No | Function type: 'PythonLocal', 'PEL', 'Optimize', 'Equation', or built-in name (e.g. 'BJTDC_is_nf', 'PNCAPsimu'). Check funcdict via transform_get_funcdict for available types. | |
| allow_without_checkpoint | No | Proceed only if an automatic pre-overwrite save fails; use with care |