
! script name: plot.d/plotworkarea
! topic: plot geometry associated with a particular named workplane

!A
!A NAME:
!A
!A 	Plot By Named Workplane
!A
!A DESCRIPTION:
!A
!A 	This script allows geometry associated with a particular
!A 	named workplane to be plotted.
!A
!B INSTRUCTIONS:
!B
!B 	INPUT OPERATION NAME: The WORKPLANES selection box will appear
!B 		at this time.  Select the workplane associated with the
!B 		geometry to be plotted from the select box.
!B

stat=ChangeLabelStr("ScriptNameStatus","Function: plot by named workplane ")

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

Start:!

Stat=UserSelectBox("WORKPLANES","selected workplane",WsWorkArea,WsUserSelect)
IF Stat=1 THEN Leave

Stat=SetInputFormat("a99","")
Stat=GetValue("INPUT WORKPLANE NAME",Answer$)
IF (ExitScript(Destination$)) THEN Leave
IF Answer$= "CANCEL" THEN Leave

Wplane=FindUserData(Answer$,WsWorkArea)
IF NOT ValidGeometry(Wplane) THEN Start

ClearAll

Stat=PlotAssocEnt(Wplane,WsWorkArea)

GOTO Start
Leave:!

LowerSelectBox

IF (NOT LEN(Destination$)) THEN
	 LOAD "typecontrol"
ELSE
	 LOAD Destination$
END IF
END
