Variant
Object for the insertion of a design variant.
|
|
|
|
FUNC |
COM |
SF |
---|---|---|---|---|---|---|
SetFile |
Sets the file name of the FMV file. |
(String fileName) |
File name in operating system convention |
1211.1 |
1211.2 |
- |
SelectFile |
Calls a file-selector for the selection of an FMV-file and sets the file for the object. |
( ) |
|
1211.1 |
1211.2 |
- |
GetFile |
Provides the set file name. |
String GetFile ( ) |
|
1211.1 |
1211.2 |
- |
FileExists |
Does the file with the set file name exist? |
( ) |
0 = file does not exist. (If no file name is set 0 will also be provided.) |
1211.1 |
1211.2 |
- |
SetParameters |
Sets parameter variables for variant. Not all parameter variables need to be allocated. The rest will be queried when inserting the variant ('Insert'). |
(const Variables& v) |
|
1211.1 |
1211.2 |
- |
GetParameters |
Provides the parameter variables after insertion. |
(Variables& v) |
|
1211.1 |
1211.2 |
- |
Insert |
Inserts the variant. |
( ) |
|
1211.1 |
1211.2 |
- |
Done |
Did the insertion work? |
bool Done ( ) |
|
1211.1 |
1211.2 |
- |
Example Variant
START 59
rem A variant 'block.fmv' is to be inserted, where the macro
rem allocates the parameter variable 'length' and 'width' and where the parameter variable
rem 'height' from the variant insertion will be queried.
rem the variables will be allocated here (e.g. in a menu or other)
%l1:= 10
%l2:= 20
rem fill in the variables, which are known, into a variable object
FUNC delete parameters
FUNC Variables parameters
FUNC parameters.SetRealVar ("laenge", %l1)
FUNC parameters.SetRealVar ("breite", %l2)
rem convert Hicad-file name into operating system file name
FUNC delete filename
FUNC HicFileName filename
FUNC filename.Set ("c:quader.FMV")
FUNC $n:= filename.GetOSName ()
rem call the variant
rem creation of the object
FUNC delete var
FUNC Variant var
rem Set the file name in operation system convention
FUNC var.SetFile($n)
rem transfer the parameter
FUNC var.SetParameters(parameters)
rem insert the variant. The variables, which are not defined in 'parameters' will be queried.
FUNC var.insert()
END