!****h* Set-Up/LevelSet ! NAME ! LevelSet -- Sets up levels using a ASCII string name for ! each level (layer) and turns it 'ON' or 'OFF'. [LevelSet.MBS] ! ! DESCRIPTION ! This module assigns a level number to each level name ! (an ASCII string) passed ! to it. The level name is used by the various display control ! modules (See cns(), ifc(), ofc(), asy(), cmp(), sas(), ssa(), ! and pce()). Each of these modules sets standardized linelweights, ! colors, etc for the linework specified in the module's callout. ! This module is also used to turn the layer ! specified on 'ON' or 'OFF' by passing one of those two strings ! to this module as the LevelStatus (See README/Layers). ! If one layer is established, (e.g. 'ConstLines') as the default ! layer which is kept in 'OFF', the linework for any other declared ! layers can be turned on/off for viewing. ! ! The LevelStatus(100,2)*24 string array must be delared in each module ! that uses the Layer control system. The LevelInit() module must be ! run in the 1st module to use the Layer Control system. ! SOURCE GLOBAL GEOMETRY MODULE LevelSet( STRING Name*24, ! User specified layer name Stat*24; ! User specified ON/OFF status (UC only) VAR STRING LevelStatus(100,2)*24); ! Array w/ Name & ON/OFF status !*** ! ! Copyright 2006, John J. Hughes ! ! This source code file is part of the 'NGBproject' files which ! execute interactively under the 'VARKON' program, which is ! distributed under the terms of the GNU General Public License. ! ! The 'NGBproject' files are also distributed under the terms of ! the GNU GeneralPublic License. See the GNU General Public License n ! included ithe file name "COPYING.txt" in the Varkon ./app/NGB/doc ! directory for more details. ! ! NGB is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 2 of the License, or ! (at your option) any later version. ! ! NGB is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License included in the file name "COPYING.txt". ! ! You should have received a copy of the GNU General Public License ! along with NGB; if not, write to the Free Software Foundation, ! Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA INT i,LevNo; BEGINMODULE FOR i:=1 TO 100 DO IF (LevelStatus(i,1)="") THEN LevelStatus(i,1):=Name; LevelStatus(i,2):=Stat; LevNo:=i; goto next; ENDIF; ENDFOR; next:; ENDMODULE