
! script name: linetypes.d/setcurrltype
! topic: select current line type

!A
!A NAME:
!A
!A 	Current Line Type
!A
!A DESCRIPTION:
!A
!A 	This script allows the current line type to be selected.  There are
!A 	19 choices.  The selection box will have examples of the different
!A 	line types available.
!A
!B INSTRUCTIONS:
!B
!B 	The LINE TYPES OPTIONS box will appear to allow a selection of a
!B 	line type to be used.
!B
!B NOTES:
!B
!B 	The selection does not affect previously defined geometry.
!B

stat=ChangeLabelStr("ScriptNameStatus","Function: current line type ")

DIM Destination$[256]
DIM Answer$[256]
DIM Namelist$[1000]
DIM Title$[256]
DIM Label$[256]

Start:!
Title$="LINE TYPES"
Label$="LINE TYPE SELECTED"
Namelist$=          "0  NONE                    ,"
Namelist$=Namelist$&"1  ________________________,"
Namelist$=Namelist$&"2  . . . . . . . . . . . . ,"
Namelist$=Namelist$&"3  .   .   .   .   .   .  .,"
Namelist$=Namelist$&"4  ........................,"
Namelist$=Namelist$&"5  __ __ __ __ __ __ __ __ ,"
Namelist$=Namelist$&"6  __ _  __ _  __ _ __ _ __,"
Namelist$=Namelist$&"7  __ .  __ .  __ . __ . __,"
Namelist$=Namelist$&"8  __ .. __ .. __ .. __ .. ,"
Namelist$=Namelist$&"9  WIDE ___________________,"
Namelist$=Namelist$&"10 XWIDE __________________,"
Namelist$=Namelist$&"11 XXWIDE _________________,"
Namelist$=Namelist$&"12 WIDE __ __ __ __ __ __ _,"
Namelist$=Namelist$&"13 ____  _____ _____ _____ ,"
Namelist$=Namelist$&"14 ____ . _____ . _____ . _,"
Namelist$=Namelist$&"15 ____ .. _____ .. _____ .,"
Namelist$=Namelist$&"16 ___ ___ _ _ ___ ___ _ _ ,"
Namelist$=Namelist$&"17 ___ ___ .. ___ ___ ..   ,"
Namelist$=Namelist$&"18 ____ ____ _ _ ____ ____ _ _,"
Namelist$=Namelist$&"19 _____ ... _____ ... ,"

Stat=GeneralListBox(Title$,Label$,Namelist$)
Stat=SetInputFormat("a99","")
Stat=GetValue("SELECT LINE TYPE",Answer$)
IF (ExitScript(Destination$)) THEN Leave
IF Answer$= "CANCEL" THEN 
	Stat= SetCurrentLT(0)
	GOTO Leave
END IF

ON ERROR GOTO Start

Ltype= VAL(Answer$)

IF Ltype<0 OR Ltype> 19 THEN Start

LowerSelectBox

Stat=SetCurrentLT(Ltype)

Stat=ChangeLabelStr("LTypeStatus","Current Line type:   "&VAL$(Ltype))


Leave:!
LowerSelectBox
stat= SetInputFormat("n4","")
IF (NOT LEN(Destination$)) THEN
	 LOAD "typecontrol"
ELSE
	 LOAD Destination$
END IF
END
