TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: viva on August 17, 2006, 03:39:40 AM

Title: find out the units thru lisp
Post by: viva on August 17, 2006, 03:39:40 AM
hi everybody,
                 i want  to find out the units of the drawing thru lisp. my requirement is to check the distance btween two polylines. if the distance is less than 25 meters, i want 2 place a circle . can anyone give me some idea to do the process.

regards
vivek
Title: Re: find out the units thru lisp
Post by: nivuahc on August 17, 2006, 07:21:03 AM
(setq LinearUnits (getvar "LUNITS"))

1 = Scientific
2 = Decimal
3 = Engineering
4 = Architectural
5 = Fractional

(setq AngularUnits (getvar "AUNITS"))

0 = Decimal degrees
1 = Degrees/minutes/seconds
2 = Gradians
3 = Radians
4 = Surveyor's units
Title: Re: find out the units thru lisp
Post by: viva on August 18, 2006, 02:22:49 AM
hi nivuahc
         thanks for ur valuable information. it will help me alot.

regards
vivek
Title: Re: find out the units thru lisp
Post by: Kerry on August 18, 2006, 03:31:44 AM
.. also
Code: [Select]
(IF (= 1 (GETVAR "MEASUREMENT"))
  "Metric"
  "Imperial"
)