frk
Guest
I realized, with the precious help of gp, that I thank again, this lisp.
starts with "cd"
attention to the indications at the beginning.
is very dependent on the used quota style.
starts with "cd"
attention to the indications at the beginning.
is very dependent on the used quota style.
Code:
; --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
; | lisp to insert on all the vertices of a polylinea coordinate quota |
; | (ordered in uk) x and y with base point (ucs 0.0) to be defined |
; | note: the coordinates will depend on the current quota style in the dwg |
; | values are always and only positive: act on the q style. x negatives |
; --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
(defunc c:cd (/ ent idx pts totparam p1 pttt pttx ptty)
(command "_ucs" "_w")
(command "_point" breaks)
(setq p1 (getvar "lastpoint")
(command "_ucs" p1)
(vl-load-com)
(if (setq ss) ((0 .*poly*)))))
(progn)
(vla-startundomark (vla-get-activedocument (vlax-get-acad-object)))
(setq idx)
(while (< (setq idx (1+ idx))(ssslength ss))
(setq ent (ssname ss idx))
(setq totparam (fix))
(Sectq i)
(while (< (setq i (1+ i)) totparam)
(setq pt (vlax-curve-getpointatparam ent i))
(setq ptt (- (car pt) (car p1)) (- (cadr p1)))
(setq kk 30) ;write here the shift of the second point of the ordered quota in x and y
;the same value to be inserted in the quote style -lines and arrows- -offset from the origin-
(setq pttx (+ kkk (car ptt)))
(setq ptty (+ kkk))
(command "_dimordinate" ptt ".yz" ptt pttx)
(command "_dimordinate" ptt ".xz" pttty)
)
(setq pt (vlax-curve-getpointatparam ent)
(setq ptt (- (car pt) (car p1)) (- (cadr p1)))
(setq kk 30) ;write here the shift of the second point of the ordered quota in x and y
;the same value to be inserted in the quote style -lines and arrows- -offset from the origin-
(setq pttx (+ kkk (car ptt)))
(setq ptty (+ kkk))
(command "_dimordinate" ptt ".yz" ptt pttx)
(command "_dimordinate" ptt ".xz" pttty)
)
(vla-endundomark (vla-get-activedocument))
)
)
(princ)
)