
! script name: plot.d/plotbyoper
! topic: plot geometry associated with a particular operation

!A
!A NAME:
!A
!A 	Plot By Operation
!A
!A DESCRIPTION:
!A
!A 	This script allows geometry associated with a particular
!A 	operation to be plotted.
!A
!B INSTRUCTIONS:
!B
!B 	INPUT OPERATION NAME: The OPERATIONS selection box will appear
!B 	at this time.  Select the tool associated with the geometry to
!B 	be plotted from the select box.
!B

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

DIM Destination$[256]
DIM Answer$[256]
DIM Namelist$[4000],Namelist2$[4000]

Start:!
Stat= UserDataNames(WsCMMProbeData,Namelist$)
IF NOT LEN(Namelist$) THEN Leave
Stat= GeneralListBox("PROBES","probe operation",Namelist$)

Stat=SetInputFormat("a99","")
E1=PickEntity("INPUT PROBE NAME",Answer$)
IF ExitScript(Destination$) OR Answer$= "CANCEL" THEN Leave

IF ValidGeometry(E1) THEN
        Probe=GetAssocEnt(E1,WsCMMProbeData)
ELSE
	Probe=FindUserData(Answer$,WsCMMProbeData)
END IF
IF NOT ValidGeometry(Probe) THEN Start
ClearAll
Stat=PlotAssocEnt(Probe,WsCMMProbeData)

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