ferhatpeker Posted March 15, 2012 Posted March 15, 2012 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. Quote
pBe Posted March 16, 2012 Posted March 16, 2012 (edited) 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) [color=blue](defun parseStr (str / strA pr v)[/color] [color=blue] (setq strA (if (zerop (atoi (setq v str)))[/color] [color=blue] (setq pr (vl-string-right-trim "0123456789" str))[/color] [color=blue] (progn (setq pr "") v)))[/color] [color=blue] (strcat pr (itoa (1+ (atoi (if (eq strA str) strA (vl-string-trim strA str) )))))[/color] [color=blue] )[/color] [color=blue](defun _inccopy (e p1 p2)[/color] [color=blue] (vla-move (setq e (vla-copy e))[/color] [color=blue] (vlax-3d-point p1)[/color] [color=blue] (vlax-3d-point p2))[/color] [color=blue] (vla-put-textstring e[/color] [color=blue] (parseStr (vla-get-textstring e)))[/color] [color=blue] e[/color] [color=blue] ) [/color] (cond ((and (setq TxtObj (ssget "[b][color=blue]_[/color][/b]: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)) [color=blue] (setq TxtObj (_inccopy TxtObj fp sp))[/color] [color=blue](princ "\nLeft Click to Copy Increment:")[/color] (while [color=blue](= (car (grread nil 10)) 3)[/color] (setq TxtObj[color=blue] (_inccopy TxtObj fp sp))[/color] (setq fp sp sp (polar sp ang dst)) ) ) ) )(princ) ) HTH EDIT: Modified Code Edited March 16, 2012 by pBe Update Snippet Quote
ferhatpeker Posted March 16, 2012 Author Posted March 16, 2012 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. Quote
pBe Posted March 16, 2012 Posted March 16, 2012 ..... i couldn't understand and use that lisp..... Thats too bad. .....I want to see additional function in dialog box of ATM V4 lisp. If you can do that it will be perfect. I'm sure it would be, but i cant very well do anything about ATN V4.lsp as I'm not the author. 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. 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.... Quote
ferhatpeker Posted March 16, 2012 Author Posted March 16, 2012 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. Quote
pBe Posted March 16, 2012 Posted March 16, 2012 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 Quote
fixo Posted March 16, 2012 Posted March 16, 2012 .... 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 Quote
ferhatpeker Posted March 16, 2012 Author Posted March 16, 2012 Can't anybody help me for this lisp? Quote
pBe Posted March 16, 2012 Posted March 16, 2012 Check this snippet again pleaseI want the same but the code above isn't working on my end Maybe some lines was lost by copy-paste.... Regards, Oleg 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 Quote
ferhatpeker Posted March 16, 2012 Author Posted March 16, 2012 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 Unfortunately, this is not my need. Thanks in any case. Quote
fixo Posted March 16, 2012 Posted March 16, 2012 Awesome Thanks for your work Already what I wanted Regards, Oleg Quote
pBe Posted March 16, 2012 Posted March 16, 2012 AwesomeThanks for your work Already what I wanted Regards, Oleg Thank you Oleg. At least somebody have a use for it Cheers Unfortunately, this is not my need. Thanks in any case. Somehow i cant figure out what you need ferhatpeker, now I'm not even sure we are talking a bout the same Text Numbering lisp code. Sorry i cant be of any more help Quote
ferhatpeker Posted March 17, 2012 Author Posted March 17, 2012 ;; (Contact Lee Mac, CADTutor.net, TheSwamp.org) ;; ;; ~ With Additional Thanks to: ;; Charles Alan Butler (CAB) ;; ;; PLATFORMS: ;; Tested in ACAD 2004, ACAD 2010. ;; ;; VERSION: ;; 1.0 ~ 18.06.2009 ~ First Release ;; 2.0 ~ 25.06.2009 ~ Changed Direction Method ;; 3.0 ~ 25.06.2009 ~ Pick Angle added ;; ========================================== ;; ;; 4.0 ~ 26.06.2009 ~ CAB combined routines, NumInc.lsp ;; A button for each function ;; ;; ========================================== ;; ;; ============ NumInc.lsp =============== ;; ;; FUNCTION: Number Increment ;; Will sequentially place numerical ;; text upon mouse click, with optional ;; prefix and suffix. ;; ;; >> Enter = Exit ;; >> Space = Rotate ACW ;; >> Shift + Space = Rotate CW ;; >> Tab = Rotate 90 ;; >> Shift + Tab = Mirror Rotation ;; >> C = Curve Aligned ;; >> R = Replace Text/Attribute ;; >> T = Toggle Counter ;; ;; AUTHOR: ;; Copyright (c) 2009, Lee McDonnell ;; (Contact Lee Mac, CADTutor.net) ;; ;; PLATFORMS: ;; Requires Express Tools for full Functionality. ;; Tested in ACAD 2004, 2010. ;; ;; VERSION: ;; 1.0 ~ 12.04.2009 ~ First Release ;; 2.0 ~ 14.04.2009 ~ Incremental Prefix/Suffix ;; 3.0 ~ 15.04.2009 ~ DCL Version ;; 4.0 ~ 15.04.2009 ~ Replace Text Added ;; 5.0 ~ 16.04.2009 ~ Leading Zeros Allowed ;; 6.0 ~ 18.06.2009 ~ Total Program Upgrade ;; 7.0 ~ 27.06.2009 ~ Counter Toggle/Bug Fixes ;; ;; ======================================= This lisp which i use. ( only description ) Quote
pBe Posted March 17, 2012 Posted March 17, 2012 ;; ;; AUTHOR: ;; Copyright (c) 2009, Lee McDonnell ;; ([b][color=blue]Contact Lee Mac[/color][/b], CADTutor.net) ;; ;; PLATFORMS: ;; Requires Express Tools for full Functionality. ;; Tested in ACAD 2004, 2010. ;; This lisp which i use. ( only description ) There's your answer ferhatpeker Quote
ferhatpeker Posted March 17, 2012 Author Posted March 17, 2012 (edited) I know But he didn't write anything till now. And i don't want to write special message to him. Maybe he is busy. Edited March 17, 2012 by ferhatpeker Quote
Lee Mac Posted March 17, 2012 Posted March 17, 2012 But he didn't write anything till now. And i don't want to write special message to him. Maybe he is busy. I replied to your email stating that I was no longer developing this program. Quote
ctdlc888 Posted March 17, 2012 Posted March 17, 2012 I think what the OP needs is HERE..http://www.lee-mac.com/numinc.html JUST LACKING OFFSET XY Quote
ferhatpeker Posted March 18, 2012 Author Posted March 18, 2012 I also used that lisp. But i need additional function. "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 distance for X and Y direction 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. " Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.