Bracket dimensions and standards

Label 2 in the bracket type macro defines the questions that are asked in the bracket dialog which opens when the user chooses to insert a bracket. These questions can relate to the dimensions and size of the bracket. See Label 2.

Label 3 defines the default answers to the questions. See Label 3.

Label 4 defines the standards for creating the bracket. See Label 4.

See also:

Calling other type's type macro (labels 3 and 4)

Retrieving dimensions before opening the bracket dialog (label 3)

Label 2

Label 2 defines which questions are asked in the bracket dialog. The questions can relate to the following properties of the bracket:

  • Dimensions of the sides

  • The size of the overlaps

  • The radius of rounding arcs

  • Corner holes

  • The thickness of the bracket

The questions are defined using Quest[i] variables (where i=1,...,20). A Quest[i] variable value can be a literal question text, or it can be a number referring to a label number in the bracketquest0.cmd, bracketquest1.cmd and bracketquest2.cmd macros in the norms, %ncgnorms%\bracket folder. The labels in the bracketquest macros contain the question texts.

Examples:

Quest[1]='Enter width of bracket'

Quest[2]=14

Important: The question about the bracket thickness must always be asked last.

Label 3

Label 3 defines the default answers to the questions in label 2. The default answers are prefilled in the input boxes of the bracket dialog.

  • The answer to question Quest[i] (where i=1,...,20) is defined in Ans[i]. If there is no matching Ans[i] variable defined in label 3 for a Quest[i] variable in label 2, the corresponding input box in the bracket dialog will be empty, and the user must enter the value.

  • It is also possible to set Ans[i] to -12345. This may be done to ensure that the answer to a question remains open so that the user will have to enter it even when a standard has been defined. In this case the input box for the question does not appear dimmed, as normally when a standard is used, and it is possible to enter a value.

Defaults can also be set for the options in the drop-down menus in the bracket dialog.

  • The default option for the creation of flanges or face plates can be set with the FlangeAction variable (see Flanges and face plates).

  • The default material for the bracket can be set with the Material variable.

The Stand variable defines the designation for the standard dimensions with which the bracket is to be created, shown in the Standards drop-down menu in the bracket dialog. The value of Stand is a numeric value or 'free'. When Stand is set to 'free', all of the input boxes for answers will be empty, and the user can enter the desired values.

Stand='02'

Stand='free'

Depending on the conditions in label 3 (see Conditions), a suggestion may be made about the standard (if defined) to be used for the creation of the bracket. The standards are defined in label 4.

Example of label 3

label 3

Flangeaction=3

Ans[2]=HP[4]

if HP[1]<>0 then

{

 If abs(HpGap[1]-Def_Par_Dist)>3 : Ans[1]=Def_HP_Fact*HP[1]+HpGap[1];

 else Ans[1]=Def_HP_Fact*HP[1]+Def_Par_Dist

}

Ans[3]=DP[1]

if CheckCorner=False : CornerValue=Corner_Dist;

else CornerValue=0.25*HP[4]

Material='ALM'

exit

In the above example:

  • The answer to the second question is set to be the height of the fourth part. If the height of the first part does not equal 0 (i.e. a profile, flange, face plate, or pillar has been selected), the system checks the height of the hole between the first part and the second part. If the distance between these heights differs from the global default distance (Def_Par_Dist) by more than 3, the answer to the first question is set to be Def_HP_Fact times the height of the first part plus the size of this hole. Def_HP_Fact is the default multiplication factor for dimensions that concern profiles (usually 1.25).

  • In the case of the first question, the answer is set to Def_HP_Fact times the height of the first part plus the default size of the hole between the profile and the plate.

Label 4

If label 3 contains a reference to a particular standard, defined with the Stand variable, this standard must be defined in label 4.

Note: No more than 99 standards can be defined.

If the bracket is set to be a "free" bracket by setting the value of Stand to free, the system will not call label 4 (it will be ignored).

If there is a standard defined in label 4 that matches a standard defined in label 3, the values belonging to this standard are connected to the corresponding questions by using Ans variables. For example:

LABEL 4

 if Stand='801':PosNr=stand;Ans[1]=100;Ans[2]=100;Ans[3]=7;

 if Stand='802':PosNr=stand;Ans[1]=120;Ans[2]=120;Ans[3]=8;

exit

or

LABEL 4

 if Stand='KN 10' :PosNr=810;Ans[1]=100;Ans[2]=100;Ans[3]=7;

 If Stand='KN 12' :PosNr=812;Ans[1]=120;Ans[2]=120;Ans[3]=8;

exit

Variable PosNr defines the part number.

bracket<typenr>.inp, bracket<typenr>.lst and bracket<typenr>.fre

If standard dimensions have been defined for a particular type of bracket, the bracket<typenr>.inp file must be present in the norms, %ncgnorms%\bracket folder. <typenr> is the type number of the bracket, bracket750.inp for example.

The bracket<typenr>.inp file contains a list of the defined standards. The system uses it to generate the corresponding bracket<typenr>.lst file automatically and, if necessary, also the corresponding bracket<typenr>.fre file.

  • The bracket<typenr>.lst file sets the list of the available standards shown in the Standards drop-down menu in the bracket dialog. If this file does not exist, the system will look for the bracket<typenr>.inp file which is then used to generate the missing file.

  • The bracket<typenr>.fre file is used to specify that it is possible to create a free bracket, even when standards have been defined for that bracket. If the bracket<typenr>.fre file does not exist, a free bracket cannot be created.

Important: If a new standard is needed for a particular type of bracket, the bracket<typenr>.inp file must be modified to include the definition for it. After modifying bracket<typenr>.inp, the associated bracket<typenr>.lst and bracket<typenr>.fre files must be deleted. The system will then generate new versions of the bracket<typenr>.lst and bracket<typenr>.fre files.

Syntax of bracket<typenr>.inp

The bracket<typenr>.inp file has the following syntax:

<standard reference> <part number> <standard id>

and, if necessary:

free  0  100

Example:

A300   801 1

A400   802 2

A500   803 3

A600   804 4

or

A300       801 1

A400       802 2

A500       803 3

free       0  100

The free  0  100 sequence defines that it is possible to create a free bracket. A free "standard" is always given part number 0 and standard id 100. If this sequence is missing, it is not possible to create a free bracket.

The standard id is a number ranging from 1 to the number of standards. The system uses the standard id to find the bracket standard after a bracket is modified.

Calling other type's type macro (labels 3 and 4)

It is possible to refer to the type macro of another bracket in labels 3 and 4. This way, a different bracket can be created depending on the situation. The different situations should be expressed as conditions, and for each condition define the desired bracket type to be created. Referring to another bracket's type macro in label 4 makes it possible to use the standards defined for the other bracket type.

Example:

label 3

 if angle >=60 : BracketNumber='775' ;

 if angle >=75 : BracketNumber='774' ;

 if angle >=90 : BracketNumber='773' ;

 do -ncgnorms/bracket/bracket^bracketnumber,1

exit

label 4

 do -ncgnorms/bracket/bracket^bracketnumber,2

exit

In this example, label 3 of the type macro calls label 1 of the type macro of another bracket type, the type depending on the angle between parts 1 and 2. Label 1 of the called bracket^bracketnumber.cmd macro contains the settings normally found in label 3 of the type macro that is making the call. Label 2 of the bracket^bracketnumber.cmd contains the settings normally found in label 4 of the type macro that is making the call.

Note: If you use this method, do not use the BracketNumber variable in the VarStr variable in label 5 when specifying the type.

Retrieving dimensions before opening the bracket dialog (label 3)

It is sometimes necessary to retrieve certain dimensions even before the bracket dialog is opened. For example, if a certain set of standard dimensions should be selected before the dialog is opened. This can be done by calling the lb3/brackprelist.cmd macro in label 3.

do lb3/brackprelist

The lb3/brackprelist.cmd macro presents an option menu containing values from which a selection can be made. The content of this list is taken from the bracket<typenr>.dat file. This file contains two columns. The values of the first column are displayed in the option menu.

Example of bracket<typenr>.dat contents:

     120 7

     160 8

     180 8

The values indicate in the height and the thickness of a profile.

Example of label 3 in the type macro:

label 3

Numeric PrelistID ,Dvar1, Dvar2

Numeric beta,gamma,Dx,Dy,Dz,Dw,Dangle

if HP[2]=80     : PrelistID=1;

if HP[2]=100    : PrelistID=2;

do lb3/brackprelist

beta=180angle

gamma=90beta

Dx=Dvar1*sin(gamma)/sin(beta)

Dy=HP[2]/sin(beta)

Dz=DxDy

Dw=4*Dvar2+40+Dz

Dangle=180atan(Dvar1/Dw)

if Dangle > 180 : Dangle=Dangle180

if Dangle > 60 :BracketNumber='774' ; HoekX=60;

if Dangle > 75 :BracketNumber='775' ; HoekX=75;

Ans[3]=HoekX;

do -NCGNORMS/bracket/bracket^BracketNumber,1

exit

The PrelistID variable defines the index number of the element selected from the list (line in bracket<typenr>.dat). It is used to set the default value of the list presented before the macro lb3/brackprelist.cmd is called.

Variables Dvar1 and Dvar2 contain the selected values (columns in bracket<typenr>.dat).

Note: Variables PrelistID, and Dvar1 and Dvar2must be defined in the type macro if the lb3/brackprelist.cmd macro is used.