Automatic Text Numbering V4, s
Firstly thank you very much for this site.Today i downloaded and used "automatic text numbering V4" lisp. Very useful and successful.
I need more property in this lisp. When i use this lisp i want that numbered text will be consist specific distance ( X or Y direction ) from cursor point.
Thanks in advance. Not as well rounded and efficient as ATN_V4 but works nonetheless
(Defun c:CMI(/ parseStr _inccopy TxtObj fp sp dst ang) (vl-load-com) (defun parseStr(str / strA pr v) (setq strA (if (zerop (atoi (setq v str))) (setq pr (vl-string-right-trim "0123456789" str)) (progn (setq pr "") v))) (strcat pr (itoa (1+ (atoi (if (eqstrA str) strA (vl-string-trim strA str)))))) ) (defun _inccopy (e p1 p2) (vla-move (setq e (vla-copy e)) (vlax-3d-point p1) (vlax-3d-point p2)) (vla-put-textstring e(parseStr (vla-get-textstring e))) e ) (cond ((and (setq TxtObj (ssget "_:L:S:E" '((0 . "TEXT")))) (setq TxtObj (vlax-ename->vla-object (ssname TxtObj 0))) (setq fp (getpoint "\nPick first point: ")) (setq sp (getpoint fp "\nPick second point: ")) (setq dst (distance (setq fp (trans fp 1 0)) (setq sp (trans sp 1 0))) ang (angle fp sp)) (setq TxtObj (_inccopy TxtObj fp sp)) (princ "\nLeft Click to Copy Increment:") (while (= (car (grread nil 10)) 3) (setq TxtObj (_inccopy TxtObj fp sp)) (setq fp sp sp (polar sp ang dst)) ) ) ) )(princ) )
HTH
EDIT: Modified Code thanks pBE.
i couldn't understand and use that lisp.
I want to see additional function in dialog box of ATM V4 lisp. If you can do that it will be perfect.
When i use ATM V4 lisp, i want to specify distance from cursor point for text location. After my click for text location, numbered text will be consist specific distance ( X or Y direction ) from clicked point. Thats too bad.
I'm sure it would be, but i cant very well do anything about ATN V4.lsp as I'm not the author.
The snippet i posted should be able to do that. (that is if i correctly understand your reqeust)
EDIT: thinking about it, i'm probably off with the code i posted
Can you explain this line?
....consist specific distance ( X or Y direction ) from clicked point.... It means, for example I want to gove numbers just out of a circle but I want to click center of the circle. I will give number to X and Y larger than the diameter of the circle so that when I click center of the circle, number will be placed just out of it as I wanted. That is why I wanted that thing. Thanks.
....I think I'll pass on this one .....
BTW: Welcome to the forum Check this snippet again please
I want the same but the code above isn't working on my end
Maybe some lines was lost by copy-paste....
Regards,
Oleg thanks pBE. Can't anybody help me for this lisp?
By george you are right!! Thank you for testing Oleg.
Code Updated
But i still dont think thats what the OP wants.
At any rate... what it does is increment the string value by 1 and continues to add and copy as you Left-Click the mouse at the same angle and distance from first point and second point.
Cheers
页:
[1]
2