
! script name: plot.d/plotigsplanar
! topic: Sample - plot geometry associated with a iges planar data property

!A
!A NAME:
!A
!A 	Plot Iges Planar Data
!A
!A DESCRIPTION:
!A
!A 	plot geometry associated with a iges planar data property
!A
!B INSTRUCTIONS:
!B
!B 	NO HELP AVAILABLE AT THIS TIME
!B
!C NOTE:
!C
!C 	This is an unsupported sample script.
!C

stat=ChangeLabelStr("ScriptNameStatus","Function: plot iges planar data ")

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


PLANAR_ASSOC= 45 ! WsIgesAssocForm16


Start:!
Stat= UserDataNames(PLANAR_ASSOC,Namelist$)
IF NOT LEN(Namelist$) THEN Leave
Stat= GeneralListBox("PLANAR ASSOCIATIVITY ","selected ",Namelist$)

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

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

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