CSYS,11
NSEL,,LOC,Y,-1E-5,1E-5 $NSEL,R,LOC,Z,-1E-5,1E-5 $*GET,QNX,NODE,,COUNT
NSEL,,LOC,X,-1E-5,1E-5 $NSEL,R,LOC,Z,-1E-5,1E-5 $*GET,QNY,NODE,,COUNT
NSEL,,LOC,X,-1E-5,1E-5 $NSEL,R,LOC,Y,-1E-5,1E-5 $*GET,QNZ,NODE,,COUNT
*DIM,POLE3D,ARRAY,QNX,QNY,QNZ
*DO,I,1,QNX 
  *IF,I,EQ,1,THEN    
    NSEL,,LOC,X,-1E-5,1E-5
    CM,P1,NODE
  *ENDIF
  *IF,I,EQ,2,THEN
    ESLN $NSLE $CMSE,U,P1 $CM,P2,NODE
  *ENDIF
  *IF,I,GT,2,THEN
    ESLN $NSLE $CMSE,U,P%I-2% $CMSE,U,P%I-1%,NODE
    CM,P%I%,NODE
  *ENDIF
  NPLOT
  *DO,J,1,QNY
    *DO,K,1,QNZ
      ND=NODE(0,-1000,0)
      POLE3D(I,J,K)=ND
      NSEL,U,,,ND
    *ENDDO
  *ENDDO
*ENDDO