home *** CD-ROM | disk | FTP | other *** search
- -- 11-Dec-87 NEHolt; Created - UPL 3.0 demo program
-
- -- ------------------------------------ LAY.UPL --------------------
- -- PURPOSE: Provide a quick alternative to VERIFY ENTITY when you
- -- just want to know the LAYER number of a digitized entity
- --
- -- Syntax: RUN LAY (then digitize entity)
- --
- PROC MAIN
-
- INTEGER Mdata(8),Ngot,Iend,ierr,EntMib(1),i
-
- -- * * * start of executable code * * *
- BREAK_CHAR = 3 -- set up CTRL-C to abort (ascii 03 = ^C)
- TextColor(13)
- DigNext:
- Print ': ent ', -- prompt user to digitize the entity
- GetEnt(1,Ngot,EntMib(1),Iend) -- get mib of digitized ent
- if Ngot = 0 then goto Done;endif -- abort if none digitized
- -- Open and read the entity's 8-word master index block (MIB)
- -- It contains entity's type, layer, color, font, vvis, group info
- ReadEnt(EntMib(1),MData(1)) -- get 8 word index block of ent
- Print ' LAY=',
- TextColor(15); PRINT MData(4) -- output LAYER number (4th word)
- TextColor(13)
- -- Entity "highlighted" when dititized. Toggle it back to normal.
- HiLightEnt(EntMib(1),1,ierr) -- "Un Highlight" highlighted ent
- goto DigNext -- loop back to let user digitize again
-
- DONE:
- END PROC
-