home *** CD-ROM | disk | FTP | other *** search
/ TestDrive Super Store 2.3 / TESTDRIVE_2.ISO / truecad / macro / connect.mac next >
Encoding:
Text File  |  1994-02-01  |  1.1 KB  |  47 lines

  1. REM ************************************************************************
  2. REM  Macro to connect the dots .. to draw lines between given points
  3. REM  this macro assumes that the points have been placed with
  4. REM  the LOADCRD macro which also place a reference data
  5. REM  item at each point.
  6. REM ************************************************************************
  7. d$=""
  8. while(1)
  9.    {
  10.    enter  "Give Label of first point to connect (Blank to quit)" d$
  11.    if(!strcmp(d$," ")|!strcmp(d$,""))
  12.       {
  13.       break
  14.       }
  15.    enter  "Give Label of next point to connect (Blank to quit)" e$
  16.    if(!strcmp(e$," ")|!strcmp(e$,""))
  17.       {
  18.       break
  19.       }
  20.    enquire DATA d$ x1 y1
  21.    if(-999999=X1)
  22.       {
  23.       m$=join$("Cannot find Point label ", d$)
  24.       mess m$ f36
  25.       pause 2
  26.       }
  27.    else
  28.       {
  29.       enquire DATA e$ x2 y2   
  30.       if(x2=-999999.0)
  31.          {
  32.          m$=join$("Cannot find Point label ", e$)
  33.          mess m$ F36
  34.          pause 2
  35.          }
  36.       else
  37.          {
  38.          line [x1,y1] [x2,y2] [#]
  39.      d$ = e$
  40.          }
  41.      }
  42.    }   
  43. end
  44.  
  45.  
  46.  
  47.