
! script name: layers.d/removenamelayer
! topic: remove the name from a layer

!A
!A NAME:
!A
!A 	Remove layer name
!A
!A DESCRIPTION:
!A
!A 	This script removes the name from a layer.
!A
!B INSTRUCTIONS:
!B
!B 	LAYER NUMBER: Enter the layer number.
!B

stat=ChangeLabelStr("ScriptNameStatus","Function: remove layer name ")

DIM Destination$[256]
DIM Answer$[256]
DIM Name$[256]

Layer=CurrentLayer

Start:!
Stat=SetInputFormat("n0=","")
Stat= SetEqualsValue(Layer)
Layer=InputLayer("LAYER NUMBER ")
IF (ExitScript(Destination$)) THEN Leave
Stat= SetCurrentLayer(Layer)

Stat=SetInputFormat("a1=",",Y,N,")
Stat= SetEqualsValue(0,"Y")
Stat=GetValue("REMOVE LAYER "&VAL$(Layer)&" NAME:  Yes or No ",Answer$)
IF (ExitScript(Destination$)) THEN Leave

IF Answer$= "Y" THEN 
	Stat= CreateNamedLayer(Layer,"")
END IF
GOTO Start

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