home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / p / p115 / 10.ddi / GCD4 / UPL / LAY.UPL < prev    next >
Encoding:
Text File  |  1988-03-17  |  1.2 KB  |  33 lines

  1. -- 11-Dec-87 NEHolt; Created - UPL 3.0 demo program
  2.  
  3. --  ------------------------------------ LAY.UPL --------------------
  4. --  PURPOSE: Provide a quick alternative to VERIFY ENTITY when you
  5. --  just want to know the LAYER number of a digitized entity
  6. --
  7. --  Syntax:  RUN LAY (then digitize entity)
  8. --
  9.  PROC MAIN
  10.  
  11.     INTEGER Mdata(8),Ngot,Iend,ierr,EntMib(1),i
  12.  
  13. -- * * *   start of executable code   * * *
  14.     BREAK_CHAR = 3   -- set up CTRL-C to abort (ascii 03 = ^C)
  15.     TextColor(13)
  16. DigNext:
  17.     Print ': ent ',    -- prompt user to digitize the entity
  18.     GetEnt(1,Ngot,EntMib(1),Iend) -- get mib of digitized ent
  19.     if Ngot = 0 then goto Done;endif -- abort if none digitized
  20.     -- Open and read the entity's 8-word master index block (MIB)
  21.     -- It contains entity's type, layer, color, font, vvis, group info
  22.     ReadEnt(EntMib(1),MData(1))   -- get 8 word index block of ent
  23.     Print ' LAY=',
  24.     TextColor(15); PRINT MData(4)  -- output LAYER number (4th word)
  25.     TextColor(13)
  26.     -- Entity "highlighted" when dititized. Toggle it back to normal.
  27.     HiLightEnt(EntMib(1),1,ierr) --   "Un Highlight" highlighted ent
  28.     goto DigNext            -- loop back to let user digitize again
  29.  
  30. DONE:
  31.  END PROC
  32.  
  33.