hanhphuc 发表于 2022-7-5 23:04:24

谢谢你的分享。我认为这个想法是一样的,只是也许OP需要加入他的属性块?
通过手动方式,如果正值,则我认为DIMORDIM带有前缀,我的0.02

yathishkumar 发表于 2022-7-5 23:13:20

你好
 
这是正确的,但是。无需点击点。只是打字
基于反转级别的键盘。
我的基准是594,反转标高是600.23,在桩号0+321,y轴上
需要放置圆或块。

hanhphuc 发表于 2022-7-5 23:15:51

你应该提供块参考,否则我们只是在尝试。
所以这只是另一个简单的概念,只需放置文本(不像李·麦克那样解析字符串)
 
通过键盘输入反转水平标记

in red

*IL:shx* *IL:user* ;global variables

(defun c:ILM (/ *error* v var p0 u1 u2 tmp shx f ip sz str); Invert level elevation marker
;hanhphuc 25/10/2014
(if (not(findfile (setq shx (strcat(getvar "tempprefix") "IL.shx"))))
(progn(setq f (open (setq tmp (strcat(getvar "tempprefix") "IL.shp")) "W"))
(foreach x
'("*1,42,IL"
"4,250,4,4,3,107,3,37,3,28,002,9,(0,0),001,9,(64,111),(-127,0),(-1,0),(64,-111),(0,0),002,9,(0,0),001,4,28,4,37,4,107,3"
"4,3,250,0")
(write-line x f))
(close f)
(command "compile" tmp)
)
); if

(if (and (not *IL:shx* ) shx)
(setq *IL:shx* (vl-cmdf "load" shx)))

(mapcar 'set '( v str *error*var)
(list '( "osmode" "cmdecho" "dimzin")'("\nRef. station?" "Datum?" "Textsize?" )
'((msg) (if(not (wcmatch (strcase msg) "*CANCEL*,*EXIT*"))
           (princ (strcat "\nError: " msg)))(princ))                  
                    (mapcar 'getvar v )))

(foreach x v (setvar x 0))

;;;OP's quoted : " my datum is 594, invert level is 600.23, on station 0+321 " so set as default value..

(setq *IL:user* (if (vl-every 'not *IL:user*) '((0. 594. 1.) (321. 600.23)) (list (car *IL:user*) (cadr *IL:user*))))               
(if (and (setq p0 (getpoint "\nPick reference point.."))
(setq u1 (hp# 'getreal '(0 0 6) str (car *IL:user*)))
) ;_ end of and
(progn
(prompt
(vl-string-translate "?" ":"
(apply 'strcat (mapcar ''((a b )(strcat a (rtos b 2 2))) str (car *IL:user*)))))
(textpage)
(while (if (and        (setq u2 (hp# 'getreal '(0 0) '("\nInput STA?" "Invert Level?") (cadr *IL:user*)))
        (setq *IL:user* (list u1 u2))
        (setq ip (mapcar '+ p0 (mapcar '- u2 u1)))
        ) ;_ end of and
(progn
         (setq sz (caddar *IL:user*))
   (vl-cmdf "shape" "IL" ip sz 0.0)
        (entmakex (list        '(0 . "TEXT")
                        (cons 1 (strcat "IL" (rtos (cadadr *IL:user*) 2 2)))
                        (cons 40 sz )
                        (cons 10 (polar ip (/ pi 4.) (* 1.4121 sz )))
                        ) ;_ end of list
                  ) ;_ end of entmakex
        ) ;_ end of progn
) ;_ end of if
) ;_ end of while
)
) ;_ end of if
(mapcar 'setvar v var)
(princ)
)

;; courtesy of the author's of "Inside AutoLisp"               
;; for rel. 10 published by New Riders Publications                
;; Referenced to the concept of UREAL UKWORD,                       
;;;HP# ; user prompt for numbersby hanhphuc 2014
(defun hp# (_f _ini _msg _def/ usr l)
(if (and(member _f '(getreal getint getdist))
         (vl-every '(lambda (x) (= (type x) 'INT)) _ini )
)
   (progn (setq usr (mapcar '(lambda (i a b) (initget i) ((eval _f) (strcat a " < "(rtos b 2 2) " > : ")))
                     _ini
                     _msg
                     _def
                     ) ;_ end of mapcar
       ) ; setq
   (while usr
   (setq l (cons (if (null (car usr))
                        (car _def)
                        (car usr)
                        ) ;_ end of if
                      l
                      ) ;_ end of cons
           usr        (cdr usr)
           _def        (cdr _def)
           ) ;_ end of setq
   l
   ) ;_ end of while
   (reverse l)
   ) ;_ end of progn
   ) ;_ end of if
) ;_ end of defun


步骤:
命令:ILM选取参考点。。[颜色=“红色”];[屏幕中基准点处的拾取点]参考站?<0.00>:;[输入]基准?<594.00>:;[输入]文本大小?<1.00>:;[输入]参考桩号:0.00 |基准:594.00 |文本大小:1.00[颜色=“红色”];:120.反转电平?<600.23>:690.50输入STA?<120.00>:;

yathishkumar 发表于 2022-7-5 23:19:41

你好
 
谢谢大家
我会试试的
 
 
thanx,你好
Yathishkumar先生
页: 1 [2]
查看完整版本: 标高标记