eldon 发表于 2022-7-6 10:02:45

You would have to edit the lisp yourself, but this is a good opportunity for you to look at the lisp and discover how it works.
 
The lisp grabs coordinates, but to write them on the screen, they have to be changed from real numbers to a string of text that can be written to the screen.
 
The lisp function that does that is 'rtos' and it also has facilities to change the mode of the units and the precision.
 
So you look through the code until you find something in that vein.

    "X=" (rtos(* dFlc(car fPt))2 dDec)       "\\X"       "Y=" (rtos(* dFlc(cadr fPt))2 dDec)       ); end strcat
 
Then you should find out what the modes are:-
1. Scientific 1.55E+01
2. Decimal 15.50
3. Engineering 1'-3.50"
4. Architectural 1'-3 1/2"
5. Fractional 15 1/2
and you can see that the lisp is set for Decimal mode 2. You probably want mode 3 or 4, so just edit those numbers, and save it.
 
As always there are different ways of doing things, but this should give you a start.

Lee Mac 发表于 2022-7-6 10:07:30

Eldon's information is correct, and I would suggest you look over the code.
 
But I don't agree with how ASMI has coded the while loop, forcing the user to hit Esc.
 

(defun c:DimO ( / *error* ocm units prec fac p ) (vl-load-com) ;; © Lee Mac 2010 (defun *error* ( msg )   (and ocm (setvar 'CMDECHO ocm))   (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")       (princ (strcat "\n** Error: " msg " **")))   (princ) ) (mapcar 'set '(fac units prec) (mapcar 'getvar '(DIMLFAC DIMLUNIT DIMDEC))) (setq ocm (getvar 'CMDECHO)) (setvar 'CMDECHO 0) (while (setq p (getpoint "\nSpecify Point: "))   (command "_.dimordinate" "_non" p "_T"   (strcat       "X="    (rtos (* fac (carp)) units prec)       "\\XY=" (rtos (* fac (cadr p)) units prec)   )   pause   ) ) (setvar 'CMDECHO ocm) (princ))

losquest 发表于 2022-7-6 10:12:41

thanks gents

Lee Mac 发表于 2022-7-6 10:16:30

You're welcome Losquest.

NH3man! 发表于 2022-7-6 10:18:58

Every time I think I have it all you have something hidden in the corner.   This will save me half the time the way I was doing it.   Thanks LEE
 

Lee Mac 发表于 2022-7-6 10:23:15

You're welcome NH3man!
 
Long time no see...
页: 1 [2]
查看完整版本: need help for atomatic co-orin