
! script name: delete.d/deletematerial
! topic: delete material 

!A
!A NAME:
!A
!A 	Delete Material
!A
!A DESCRIPTION:
!A
!A 	This script allows the deletion of the material. 
!A

stat=ChangeLabelStr("ScriptNameStatus","Function: delete material")

DIM Destination$[256]
DIM Answer$[256]
DIM Choice$[256]

DeActivateUndo

Material=FindUserData("MATERIAL",WsMaterial)
IF ValidGeometry(Material) THEN
	Stat= DeleteEntity(Material)
END IF

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