TimZilla Posted May 1, 2010 Posted May 1, 2010 is there already one out there that does the same thing for text? after I finish my design, I go through and clean up all of the room names and room tags, and I find myself rotating them to fit them in sometimes. I love this and I am sure I will use it, thanks Lee Mac, this is very cool. Quote
Lee Mac Posted May 1, 2010 Author Posted May 1, 2010 (edited) Thanks Tim, There's three more similar here: http://www.cadtutor.net/forum/showthread.php?t=42426 http://www.cadtutor.net/forum/showthread.php?t=35234 http://www.cadtutor.net/forum/showthread.php?t=37646 The above links are no longer valid. The programmes linked to can now be found here: http://www.lee-mac.com/programs.html Edited March 18, 2013 by CADTutor Update links Quote
TimZilla Posted May 1, 2010 Posted May 1, 2010 Man, you guys are so awesome. I wish I could do stuff like that because I have so many good idea's, just don't know how to make them. Quote
TimZilla Posted May 1, 2010 Posted May 1, 2010 Have you thought about combining NumInc and align text to curve? Quote
Lee Mac Posted May 1, 2010 Author Posted May 1, 2010 Have you thought about combining NumInc and align text to curve? It already is, type 'C' when within NumInc Quote
TimZilla Posted May 2, 2010 Posted May 2, 2010 ok, I am actually using this placing my main tags on a certain job right now. The only problem I am having, it only lets you slide it on a fixed point away from the line. So after I place it I move it a little further from my pipe. I wish it let me move it out further from the line, like once I click to place it at that angle, it lets me move it further away from the line, up, down, left and right. My pipe lengths, sizes and height's are right at that spot, I usually put my tag a little bit out more. I could see everybody at my office using this tool. also, the readable option annoys me, how do I skip that and make it default for yes. If I am asking to much just tell me to shut up =) I am so jealous you know how to do this! Quote
Crank Posted May 2, 2010 Posted May 2, 2010 How about something like this Crank?[...] You didn't have to write it, but it seemed a logic step to me. Thanks anyway But since you've asked I've tested it and there are a few things that (theoretical) could be improved: Erase the original selection Very important: Use a basepoint so it's possible to align the entities exactly on the curve (perhaps you could use the 0 key to use this) Before you exit the lisp you should select the new entities so you can use them with PREVIOUS in the next command Quote
Lee Mac Posted May 2, 2010 Author Posted May 2, 2010 ok, I am actually using this placing my main tags on a certain job right now. The only problem I am having, it only lets you slide it on a fixed point away from the line. So after I place it I move it a little further from my pipe. I wish it let me move it out further from the line, like once I click to place it at that angle, it lets me move it further away from the line, up, down, left and right. My pipe lengths, sizes and height's are right at that spot, I usually put my tag a little bit out more. I could see everybody at my office using this tool. also, the readable option annoys me, how do I skip that and make it default for yes. If I am asking to much just tell me to shut up =) I am so jealous you know how to do this! You can use the +/- buttons to alter the offset. All the tools are described in the LISP header/forum page/command-line. As for the readability option, it is easy to remove, I shall post a version with it removed. Quote
Lee Mac Posted May 2, 2010 Author Posted May 2, 2010 You didn't have to write it, but it seemed a logic step to me. Thanks anyway But since you've asked I've tested it and there are a few things that (theoretical) could be improved: Erase the original selection Very important: Use a basepoint so it's possible to align the entities exactly on the curve (perhaps you could use the 0 key to use this) Before you exit the lisp you should select the new entities so you can use them with PREVIOUS in the next command I was quite wary about erasing the original selection, which it why it stayed - perhaps I should include a prompt a la the Mirror command? What do you think? As for the basepoint, are you suggesting that the user should choose the basepoint? Currently the basepoint is the center of the selection. Quote
Lee Mac Posted May 2, 2010 Author Posted May 2, 2010 Readability option remove ( is now always readable ). Block at zero offset when first aligned. Block Align V1.1.lsp Quote
Crank Posted May 2, 2010 Posted May 2, 2010 I was quite wary about erasing the original selection, which it why it stayed - perhaps I should include a prompt a la the Mirror command? What do you think? The original selection should just be gone (similar to the Autodesk version). As for the basepoint, are you suggesting that the user should choose the basepoint? Currently the basepoint is the center of the selection. Yes. For annotatations the center location this isn't a problem, but if you align other entities it is. Autocad is an exact program, so the positioning of lines etc. has to be accurate. Now that I'm thinking of it, perhaps you should also use osnaps on placement. Quote
Lee Mac Posted May 2, 2010 Author Posted May 2, 2010 Now that I'm thinking of it, perhaps you should also use osnaps on placement. With this form of program, OSnaps are a little out of the question, as you've probably seen with many of these types of program, the grRead loop isn't too great in that way. Quote
alanjt Posted May 2, 2010 Posted May 2, 2010 GrRead is neat, but it's sacrifice of precision for visuals makes it virtually pointless. Quote
Lee Mac Posted May 2, 2010 Author Posted May 2, 2010 GrRead is neat, but it's sacrifice of precision for visuals makes it virtually pointless. True, my programs may be useless, but I enjoy writing them Quote
alanjt Posted May 2, 2010 Posted May 2, 2010 True, my programs may be useless, but I enjoy writing them I'm not saying your programs are useless. Please do not interpret it that way. That's far from what I was implying. However, you are the poster-boy for GrRead. :wink: Quote
Lee Mac Posted May 2, 2010 Author Posted May 2, 2010 I just like using it because it is a refreshing change from what is normally accomplished using LISP. Quote
Lee Mac Posted May 2, 2010 Author Posted May 2, 2010 GrRead is neat, but it's sacrifice of precision for visuals makes it virtually pointless. For OSnap we need a bit of help from Arx: ;; An example of Text Placement using a grRead substitute, ;; Function by Lee Mac, using DynDraw by Alexander Rivilis (defun c:test ( / vers step bit v str prev obj doc point ) (setq vers '((18.0 . "2010") (17.2 . "2009") (17.1 . "2008") (17.0 . "2007") (16.2 . "2006") (16.1 . "2005") (16.0 . "2004") (15.6 . "2002")) ) (setq step 1e-6 bit (if (eq "X86" (strcase (getenv "PROCESSOR_ARCHITECTURE") ) ) "x32" "x64" ) ) (cond ( (not (setq v (cdr (assoc (atof (getvar 'ACADVER) ) vers ) ) ) ) (princ "\n** Not Compatible in this Version **") ) ( (and (null dyndraw) (not (arxload (strcat "DynDraw" v (if (eq "2010" v) bit "") ".arx" ) ) ) ) (princ "\n** Arx File not Found **") ) ( (not (eq "" (setq str (getstring t "\nSpecify Text String: ") ) ) ) (vl-acad-defun 'UpdateTextCallBack) (setq obj (MCMText (if (or (eq AcModelSpace (vla-get-ActiveSpace (setq doc (vla-get-ActiveDocument (vlax-get-acad-object) ) ) ) ) (eq :vlax-true (vla-get-MSpace doc)) ) (vla-get-ModelSpace doc) (vla-get-PaperSpace doc) ) (getvar 'VIEWCTR) 0. str ) ) (setq point (dyndraw "UpdateTextCallBack" "\nSpecify Point for Text [string] : " "String" (+ 2 128 2048) -1 nil ) ) (and (vl-consp point) (vla-put-InsertionPoint obj (vlax-3D-point point)) ) ) ) ) (defun UpdateTextCallBack ( argument / tmp ) (cond ( (eq 'STR (type argument)) (if (eq "String" argument) (if (not (eq "" (setq tmp (getstring t "\nSpecify New String: ") ) ) ) (vla-put-TextString obj tmp) ) (princ "\n** Invalid Keyword **") ) (setq argument t) ) ( (vl-consp argument) (or prev (setq prev argument)) (if (< step (distance prev argument)) (progn (setq prev argument) (vla-put-InsertionPoint Obj (vlax-3D-point argument)) (vla-update obj) ) ) ) ) argument ) (defun MCMText ( block point width string / o ) (vla-put-AttachmentPoint (setq o (vla-AddMText block (vlax-3D-point point) width string ) ) acAttachmentPointMiddleCenter ) (vla-put-InsertionPoint o (vlax-3D-point point) ) o ) You'll need the right one of these: http://www.maestrogroup.com.ua/support/dyndraw.zip Quote
alanjt Posted May 2, 2010 Posted May 2, 2010 For OSnap we need a bit of help from Arx: http://www.maestrogroup.com.ua/support/dyndraw.zip Nice use of Alexander's ARX! I had never seen that until you linked to it the other day (I think @ TheSwamp). I've been eager to try it out. [My wife went out of town to see a friend, so it's just me and my little girl. Haven't had much time for LISP programming and we're having too much fun.] Quote
Lee Mac Posted May 2, 2010 Author Posted May 2, 2010 I've been eager to try it out. Me too - I've wanted to completely get my head around it first before just diving in, as the errors with Arx are a little more consequential than LISP But its a great utility - so many possibilities. The only thing that is annoying is that the user has to get the Arx, so its not a stand-along program. And also, the function doesn't react to direct keyboard input, but rather keyword and string input (at my current level of understanding of it), so you I haven't found a way to replicate my offset controls, for example, in the program in this thread. But its a great function. Lee 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.