
! script name: datatable.d/rowlwidth
! topic: Sample - change row line type in a table

!A
!A NAME:
!A
!A 	Change Row Line Type in a Table
!A
!A DESCRIPTION:
!A
!A 	This script will change the row line type in a table.
!A
!B INSTRUCTIONS:
!B
!B 	TEXT WIDTH Normal, Wide, X wide, XX wide: Thickness in pixels
!B 		when drawn on the screen. On a plotter the user should
!B 		use a thicker pen and a slower speed.
!B
!C NOTE:
!C
!C 	This is an unsupported sample script.
!C
!# see also - htdocs/help.d/datatables.htm

stat=ChangeLabelStr("ScriptNameStatus","Function: Row Line Type ")

DIM Answer$[256]
DIM A$[256]
DIM Destination$[256]
DEG


ActivateUndo
Start:!

stat= SetInputFormat("a2=",",N,W,X,XX,")
Stat=SetEqualsValue(0,"N")
Stat= GetValue("TEXT WIDTH Normal, Wide, X wide, XX wide  ",Answer$)
IF (ExitScript(Destination$)) THEN Leave

SELECT Answer$
CASE "N"
        Ltype1= 1
CASE "W"
        Ltype1= 9
CASE "X"
        Ltype1= 10
CASE "XX"
        Ltype1= 11
END SELECT

Element_loop:!
stat= SetInputFormat("n4","")
Element1=PickEntity("PICK ROW")
IF (ExitScript(Destination$)) THEN Leave
IF NOT ValidGeometry(Element1) THEN Element_loop
T1= LastPickPara

R1=TableParaRow(Element1,T1)
C1=TableParaColumn(Element1,T1)

ActivateUndo
Stat= AdvanceUndoNumber("entry ltype")
Stat= AddItemToUndo(WsUBModifyMode,Table1)

Stat= PlotDataTable(Element1,R1,0,-1)
Stat= SetTableLType(Element1,R1,0,Ltype1)
Stat= PlotDataTable(Element1,R1,0,0)

GOTO Element_loop

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