This is gid.info, produced by Makeinfo version 3.12h from gid.texinfo. This is the GiD manual Copyright 1997-2002 CIMNE  File: gid.info, Node: Specific commands, Prev: Multiple values return commands, Up: Commands used in the .bas file Specific commands ................. - *\ To avoid line-feeding, the user must write *\, so, the currently used line continues on the following line of the file `NAME.bas'. - *# Written at the beginning of the line, consider this line as a comment and does not write it. - *MessageBox. This command stops the execution of the `.bas' file and prints a message in a window; this command should be used only when a fatal error occurs. Example: ` *MessageBox error: Quadrilateral elements are not permitted.' - *WarningBox. is the same as `MessageBox' but without stoping the execution. Example: `WarningBox Warning: Exist Bad elements. A STL file is a collection of triangles bounding a volume.' The following commands must be written at the beginning of a line and the rest of the line will serve for their modifiers. No additional text should be written. * *loop, *end, *break. They are declared for the use of loops. A loop begins with a line that starts with `*loop' (no matter the letters case, as for the rest of commands) and contains another word to express the variable of the loop. There are some lines in the middle that will be repeated depending on the values of the variable and whose parameters will keep on changing through the iterations, if necessary. Finally, a loop will end with a line that finishes with `*end'. After `*end' the user may write any kind of comments in the same line. Command *break inside a loop, will finish the execution of the loop and will continue after the *end line. The variables that are available for `*loop' are the following: - elems, nodes, materials, layers, intervals, localaxes. They mean, respectively, that the loop will iterate over the elements, nodes, materials, layers, intervals or local axes systems. The loops can be nested among them. The loop over the materials will iterate only over the effectively assigned materials to an entity, in spite of the fact that more materials had been defined. The number of the materials will begin with number 1. If a command that depends on the loop is located outside it, the number also will take, by default, the value 1. After the command `*loop', if the variable is `elems' or `nodes', the user may include a modifier `*all', `*OnlyInCond' or `*OnlyInLayer' . The first one signifies that the iteration is going to be performed over all the entities; the `*OnlyInCond' modifier implies that the iteration will only take place over the entities that accomplish the concerned condition. This condition must have been previously defined with `*set cond'. `*OnlyInLayer' implies that the iteration will only take place over the entities that are in the specified layer; layers must be specified with the command `*set Layer'. By default, it is assumed that the iteration will affect all the entities. Example 1: *set elems(all) *loop nodes *format "%5i%14.5e%14.5e" *NodesNum *NodesCoord(1,real) *NodesCoord(2,real) *end nodes This command effects a rundown of all the nodes of the mesh, listing their identifiers and coordinates (x and y coordinates). Example 2: *Set Cond Point-Weight *nodes *loop nodes *OnlyInCond *NodesNum *cond(1) *end This effects a rundown of all the nodes assigned the condition "Point-Weight" and provides a list of their identifiers and the first "weight" field of the condition in each case. Example 3: *Loop Elems *ElemsNum *ElemsLayerNum *End Elems This effects a rundown of all the elements and provides a list of their identifier and the identifier of the layer to which they belong. Example 4: *Loop Layers *LayerNum *LayerName *End Layers This effects a rundown of all the layers and for each layer it lists its identifier and its name. * *if, *else, *elseif, *endif. These commands create the conditionals. The format is a line which begins with `*if' followed by an expression between parenthesis. This expression will be written in C-language syntax, value return commands, will not begin with `*' and its variables must be defined as integers or reals (see `*format', `*intformat', `*realformat)', with the only exception of `strcmp' and `strcasecmp'. It can include relational as well as arithmetic operators inside the expressions. The following are valid examples of the use of the conditionals: *if((fabs(loopvar)/4)<1.e+2) *if((p3