
! script name: pkgroups.d/pkshowbygroup
! solids: show faces by group

!A
!A NAME:
!A
!A	Show Faces By Group
!A
!A DESCRIPTION:
!A
!A	This script establishes a viewing mode where the faces in the
!A	group are shaded and the rest of the body is displayed in
!A	wireframe form.
!A
!# see also - htdocs/help.d/parasolids.htm

stat=ChangeLabelStr("ScriptNameStatus","Function: show by group ")

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

ActivateUndo


Start:!

Pick_loop:!
Stat=SetInputFormat("n4","")
E1=WPKPickEntity("PICK ENTITY IN GROUP")
IF (ExitScript(Destination$)) THEN Leave
IF NOT WPKIsEntity(E1) THEN Pick_loop

Pkgroup= WPKContainingGroup(E1,1,WsTrue)
IF NOT WPKIsEntity(Pkgroup) THEN Pick_loop

WPKClearErrorFlag
Stat= GLPlotOn(0)
Stat= WPKShowFacesByGrp(Pkgroup)


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