
! script name: layers.d/entproperties
! topic: inherit properties

!A
!A NAME:
!A
!A 	Inherit Properties
!A
!A DESCRIPTION:
!A
!A 	This script allows the current layer, color, and line-type
!A	to be changed by touching another entity.
!A
!B INSTRUCTIONS:
!B
!B	PICK SOURCE ENITTY: Pick the entity that changes the current
!B		properties.
!B

stat=ChangeLabelStr("ScriptNameStatus","Function: inherit properties ")

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

Start:!
Stat= SetInputFormat("a99","")
E1=PickEntity("PICK SOURCE ENITTY ",Answer$)
IF (ExitScript(Destination$)) THEN Leave
IF NOT ValidGeometry(E1) THEN Start

Stat=SetCurrentLT(GetLType(E1))
Stat=SetCurrentColor(GetColor(E1))
Stat=SetCurrentLayer(GetLayer(E1))

GOTO Start

Leave:!
LowerSelectBox
IF (NOT LEN(Destination$)) THEN
	 LOAD "typecontrol"
ELSE
	 LOAD Destination$
END IF
END
