VariantCreation
Object for the creation of a design variant.
|
|
|
FUNC |
COM |
SF |
---|---|---|---|---|---|
Init |
Initialises the object for the variant creation of the given part. The part needs to be located in the part tree of a design variant base part. |
void Init (const Part& p) |
1211.1 |
1211.2 |
- |
Create |
Creates the variant. The file name needs to be set. |
void Create ( ) |
1211.1 |
1211.2 |
- |
Done |
Was the creation of the variant successful? |
bool Done ( ) |
1211.1 |
1211.2 |
- |
FileOk |
Is the file name ok? |
bool FileOk ( ) |
1211.1 |
1211.2 |
- |
SelectFile |
Calls a file selector for the selection of a file name and sets the file name for the variant. |
void SelectFile ( ) |
1211.1 |
1211.2 |
- |
SetFile |
Sets the file name for the variant. |
void (String fileName) |
1211.1 |
1211.2 |
- |
EditParameterVariables |
Calls a variable edit-window for the parameter variables of the variant. |
void EditParameterVariables ( ) |
1211.1 |
1211.2 |
- |
Compute |
Computes the variant anew. All parts are computed to the start situation and the rest of the logs |
void Compute ( ) |
1211.1 |
1211.2 |
- |
ComputeToStart |
Computes all parts to the start situation. |
void ComputeToStart ( ) |
1211.1 |
1211.2 |
- |
SetModifiedPart |
Sets the formula for the part to be processed. |
void SetModifiedPart (String f) |
1211.1 |
1211.2 |
- |
SetAssembly |
Sets the formula for the assembly to which the part is added. |
void SetAssembly (String f) |
1211.1 |
1211.2 |
- |
Example VariantCreation
START 59
rem active part
FUNC delete activePart
FUNC Part activePart
FUNC activePart.StoreActive()
rem Create variant if the active part is in a processing variant
FUNC %b1 := activePart.IsInDesignVariantBase()
if b1 <> 0 then
FUNC delete varCreate
FUNC VariantCreation varCreate
FUNC varCreate.Init (activePart)
FUNC varCreate.SelectFile ()
FUNC %b2 := varCreate.FileOk()
if b2 <> 0 then
FUNC varCreate.Create ()
ifend
else
wait no variant
ifend
END