Fix combination between the two end types
The combination between the first and second with the third and fourth is free. This is not always requested. In this chapter we explain how to avoid this flexibility.
First of all the questions of the entire end shape have to be ask in one type file (the first and second end type). This in the normal way, see questions and defaults.
In label 3 the answers to these questions have to be saved, the best way is to use a temporally file, see example below. Next to this the number of the third and fourth end type must be defined in the variable endshape34. In this way you link the two end types to one shape definition. This type number have to be present in your norms but don't add this type in your third and fourth selection panel.
LABEL 3
VarStr = 'R2 ^Ans[1] R3 ^Ans[2] R4 ^Ans[3] R5 ^Ans[4]'
if decl(endshape34)=3 : endshape34='22'
variables -nctmp/type18,ans
EXIT
The decl statement is necessary in this case, this to avoid error message in your dialog screen. |
In label 6 you have to take care that the given answers will be used in your default varstr. See example below.
LABEL 6
{
string ans[8],yesok
Enable12[1]='22'
default34='22'
iffile -nctmp/type18.var : yesok='yes'
if yesok='yes' then
{
retrieve -nctmp/type18,ans
VarStr = 'R2 ^Ans[1] R3 ^Ans[2] R4 ^Ans[3] R5 ^Ans[4]'
}
}
EXIT
It is necessary to declare the ans[8] variable as string, and in our example we use the yesok to check of the file type18.var is available in the nctmp folder, saved with the variable statement below label 3. |
After adding this end type in your first and second selection panel you are able to use it, the linked type will always be used and will change the shape according to your given answers together with the first and second type.