home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1998 October / PCO_1098.ISO / filesbbs / os2 / bluecad.arj / BLUECAD.ZIP / macro.rx_ / select.rxm < prev    next >
Encoding:
Text File  |  1996-04-15  |  1.7 KB  |  37 lines

  1. /*****************************************************************************/
  2. /*                                                                                                            */
  3. /*  BlueCAD REXX Macro                                                                               */
  4. /*                                                                                                             */
  5. /*  Example of the use of REXX macro in BlueCAD                                              */
  6. /*                                                              -  Selection of primitives -            */
  7. /*                                                                                                             */
  8. /*  (c) 1995 CadWare s.r.l.                                                                            */
  9. /*                                                                                                             */
  10. /*****************************************************************************/
  11.  
  12.  
  13.                                                /* Selection of a primitive */
  14.    err = CADSelect( 1 )
  15.  
  16.    if err = 1 then
  17.      do
  18.  
  19.                                  /* Opens the selection queue */
  20.      sel = CADDbOpenQue( 'SELQUE' )
  21.  
  22.      id = CADDbFirst( sel, 'code' )
  23.      do while id > 0
  24.  
  25.        msg = 'id =' id 'Identifier of the primitive =' code
  26.        CADMsgBox( msg, 'Selected primitive' )
  27.  
  28.                                    /* Next element in the selection queue */
  29.        id = CADDbNext( sel, 'code' )
  30.        end
  31.  
  32.  
  33.  
  34.                                            /* Closes the selection queue */
  35.      call CADDbCloseQue ( sel )
  36.      end
  37.