Variables

Object for variable handling

The 'Set...-functions' for the setting of variable values are only in the script features if the variable object has been initialised with the parameter- or local variables of a design variant. It is not permitted to modify part variables in the script features.


Example Variables

 

 
 
 
 


Example Variables

rem Hicad-path

$baseHicPath    :=c:

 

rem additional path relative to'c:'

$addpath        :=processing variants

 

rem Name of the variant

$name           :=example1

 

rem obtain operating system path for HiCAD path

FUNC delete      hicFN

FUNC HicFileName hicFN

FUNC hicFN.Set ($baseHicPath)

FUNC $basepath := hicFN.GetOSName()

FUNC delete      hicFN

 

rem form variant name

$varnam:=$basepath+$addpath

$varnam:=$varnam+$name

 

rem ============ allocate variables of variant you want to add ============

 

rem -----------------------------------------------

rem create variable object, to enable calling the variable table

rem before loading the variant

rem and to transfer the entered numeric and in the graphics selected

rem object variables to the variant you want to add

rem  -----------------------------------------------

FUNC delete variablen1

FUNC Variables variablen1

 

rem -----------------------------------------

rem determine variable allocation for numeric variables of the variant

rem from CSV-file

rem -----------------------------------------

rem define name of the allocation file (...CSV-Format)

$ext:=.csv

$fn := $varnam+$ext

 

rem take over variable allocation from the CSV-file into the variable object

FUNC variablen1.MakeVarsOfFile($fn)

 

rem --------------------------------------

rem show variable table with bitmap and allocated variables

rem --------------------------------------

$ext:=.bmp

$fn := $varnam+$ext

FUNC variablen1.SetPict($fn)

 

rem -------------------------

rem show variable table

rem -------------------------

FUNC %ret:=variablen1.Edit()

if ret=0 goto 99

 

rem ============ Add variant ============

 

rem ------------------------------------

rem creation of the object for the variant to be called with the

rem concrete variable allocations

rem ------------------------------------

FUNC delete variante1

FUNC Variant variante1

 

rem -----------------------------

rem define object for the variants (file)

rem -----------------------------

rem convert Hicad-file name into operating system file name

$ext:=.fmv

$n:= $varnam+$ext

 

rem set file name of the variant (operating system convention) in variant object

FUNC variante1.Define($n)

 

rem set pre-defined parameter of variable table in variant object

FUNC variante1.SetParameters(variablen1)

 

rem insert variant Variables will be queried which are not defined in 'vars2'.

FUNC variante1.insert()

Class for Data (FUNC)