Questions and defaults

Specifying dimension questions in Label 1

The questions are asked with the help of the Quest command. A maximum of 10 questions may be asked. The question itself should be placed between single quotation marks. It is advisable to be brief, or the input panel may become too big. Examples of Quest commands are:

Quest[1]='Angle of bevelled edge'

Quest[2]='Nose height'

The first question should be given the number 1 and the following questions the numbers 2, 3, and so on.

Default answers

Several default answer strings are reserved in CADMATIC Hull. These defaults may be set in the settings.cmd file, so that these answers will be initialised when a new building section is created. The strings that may be used for this purpose are def_norms[1] to def_norms[40].

The answer is assigned to the Ans string. A maximum of 10 answers can be specified. Obviously, there is no purpose in specifying more answers than there are questions. Examples of Ans commands are:

Ans[1]=Def_norms[1]

Ans[2]='100'

 

The value of Def_norms[1] is assigned to the first answer, which belongs to the first question Quest[1]. If the Ans command is not used for a particular question, the entry box for that question will be empty. If the Ans command is used, the answer will be displayed in the panel and no value needs to be entered by the user.

In some cases the defaults are restricted to the user or to the type it selves, in that case the defaults can be retrieve by the retrieve command. In bolt cases the .var file has to be present and for that reason it is always good the check this first. This can be done with the iffile command see example below:

Iffile -ncgnorms/profs/type2.var : retrieve -ncgnorms/profs/type2.var, ans

else Ans[1]=Def_norms[1];Ans[2]='100'

In this example the defaults will be set to the fix values if the type2.var is not present otherwise the answers will be taken from the last time. In label 3 the given answers have to be saved in the type2.var file with the variables command. The answers can be saved in the -nctmp. In that case they are saved local and will be controlled only by the same user. See example below:

Iffile -nctmp/type2.var : retrieve -nctmp/type2.var, ans

else Ans[1]=Def_norms[1];Ans[2]='100'

In this last case it is important to know that some holes can have the same numbers as end types. Because you can chose for each type your own name this causes no problem. Only if you chose the same naming for different purposes.

This can help you to define the same defaults for several types, for example, if you use a more general name:

Iffile -nctmp/endtype.var : retrieve -nctmp/endtype.var, ans

else Ans[1]=Def_norms[1];Ans[2]='100'

If you are using the -nctmp environment it is important to know that it will be used for all projects. If that is a problem it is better to use the -ncgnorms and use these norms locally. In this last case one user has control of this own defaults.