alanjt Posted May 2, 2010 Posted May 2, 2010 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 Yeah, I looked at it briefly on Thursday. I was hoping it had been written as a complete replacement for GrRead (just with OSnaps), and it kind-of is, for the most part, but it takes some getting used to. And as you said, ARX is not very forgiving on errors. Quote
alanjt Posted May 2, 2010 Posted May 2, 2010 I notice you went through a lot of trouble find the correct arx and load it (impressive, BTW). In that situation, I'd almost just leave it up to the user to have these things loaded and just check to make sure it's there. Short of downloading it for them, we have to put a little faith in the user. Quote
Lee Mac Posted May 2, 2010 Author Posted May 2, 2010 I notice you went through a lot of trouble find the correct arx and load it (impressive, BTW). In that situation, I'd almost just leave it up to the user to have these things loaded and just check to make sure it's there. Cheers mate, yeah I wanted to leave as little to the user as possible... you know what its like. Nobody reads instructions, then they complain that it doesn't work. Short of downloading it for them, we have to put a little faith in the user. Funny you should say that actually - I considered that option. I used that approach in my Point Manager program - I download the help file Quote
alanjt Posted May 3, 2010 Posted May 3, 2010 Cheers mate, yeah I wanted to leave as little to the user as possible... you know what its like. Nobody reads instructions, then they complain that it doesn't work. That's about the truth. Funny you should say that actually - I considered that option. I used that approach in my Point Manager program - I download the help file I saw that. I downloaded Point Manager (just to look at) after you suggested its use when I wrote the routine that would insert circles at each LWPolyline vertex for Gilsoto. I was throughly impressed with it. I played around with the VBScript to download a file about a year ago (someone at theSwamp had posted some example code), but never had a real use for it. Quote
Lt Dan's legs Posted May 7, 2010 Posted May 7, 2010 Is there away you can make the cirlce a block or just have an option to insert a block? Or maybe do an autonumber and loop the command on your block align lisp sorry I was going to post this on Incremental Numbering Suite - Comments/Criticism Welcome or just have this lisp loop but keep the same curve selection until you exit? Quote
Lee Mac Posted May 7, 2010 Author Posted May 7, 2010 There was a whole lot of different things going on in your last post - what exactly are you talking about? Quote
Lt Dan's legs Posted May 10, 2010 Posted May 10, 2010 Sorry! I can be pretty confusing. I have a block Named "wallball2". A cirle with an attribute inside. The code I'd like modified is: (defun c:WB (/ ip) (if (setq *count* (getint "\nStarting number: ")) (progn -[Do your thing here...] );progn );if (setvar 'attdia 0) (while (setq ip (getpoint "\nInsertion Point: ")) (command "_.insert" "WALLBALL2" ; your block name ip "" "" "" (strcat (itoa *count*)) ); end command (setq *count* (1+ *count*)) ); end while (setvar 'attdia 1) ); The only reason I cannot use your Program Incremental Numbering Suite is because it needs to be blocks. I did notice you have the curve option which I really like. I was wondering if there was a way to use the curve option with the code above. Maybe only selecting the curve once and it will continously loop the command and automatically selects the curve, offset of 4" from the line and rotation always set at zero. Quote
Lee Mac Posted May 10, 2010 Author Posted May 10, 2010 Why not insert your block using the code I helped you with here, and then use the program in this thread if you wish to align it to a curve. Quote
Lt Dan's legs Posted May 10, 2010 Posted May 10, 2010 I know you said change the tag but please show me where to change it. 99% of the code is greek to me (defun c:InsertBlock ( / block tag space point ) (vl-load-com) ;; Lee Mac ~ 05.05.10 (setq block "Wallball2") ;; Block Name or nil (setq tag nil) ;; Tag Name or nil (setq space (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) ) ) (if (and (setq block (GetBlock block)) (setq *num* (1- (cond ( (getint (strcat "\nSpecify Starting Number <" (itoa (setq *num* (cond ( *num* ) ( 1 )) ) ) "> : " ) ) ) ( *num* ) ) ) ) ) (while (setq *num* (1+ *num*) point (getpoint "\nSpecify Point for Insertion: ")) (if (and (setq obj (InsertBlock space block point)) tag) (PutAttValue obj tag (itoa *num*)) ) ) ) (princ) ) (defun PutAttValue ( object tag value ) ;; Lee Mac ~ 05.05.10 (mapcar (function (lambda ( attrib ) (and (eq tag (vla-get-TagString attrib)) (vla-put-TextString attrib value) ) ) ) (vlax-invoke object 'GetAttributes) ) value ) (defun GetBlock ( block ) ;; Lee Mac ~ 05.05.10 (cond ( (not (and (or block (setq block (getfiled "Select Block" "" "dwg" 16) ) ) (or (and (vl-position (vl-filename-extension block) '("" nil) ) (or (tblsearch "BLOCK" block) (setq block (findfile (strcat block ".dwg") ) ) ) ) (setq block (findfile block)) ) ) ) nil ) ( block ) ) ) (defun InsertBlock ( Block Name Point ) (if (not (vl-catch-all-error-p (setq result (vl-catch-all-apply (function vla-insertblock) (list Block (vlax-3D-point point) Name 1. 1. 1. 0.) ) ) ) ) result ) ) tag is N Quote
Lee Mac Posted May 10, 2010 Author Posted May 10, 2010 I've noted at the top where to change block and tag name. Quote
tallika_fan Posted September 8, 2010 Posted September 8, 2010 Lee i have to say that your programs are excellent, i have been after something like these for sometime. Thumbs up! Quote
Lee Mac Posted September 8, 2010 Author Posted September 8, 2010 Thanks Taillika_fan, I'm really glad you like them - I enjoyed writing them Quote
Lee Mac Posted May 7, 2011 Author Posted May 7, 2011 I have updated the code for the ObjectAlign program: For a full description of the program, see here. Enjoy! Lee ObjectAlignV1-1.lsp Quote
roland007 Posted June 21, 2011 Posted June 21, 2011 Hi Lee, I just discovered your amazing script, and absolutely love it. Is it possible to add one more feature to the script? That is to be able to: 1. Select a block 2. Select a curve 3. Option to select single or multiple 4. Click to place block one time or multiple times by simply clicking on new position. Quote
Lee Mac Posted June 21, 2011 Author Posted June 21, 2011 Hi Roland, Glad you like the program I believe your suggestions would be possible - I'll have to see if I can get around to it. Lee Quote
Baber62 Posted March 18, 2013 Posted March 18, 2013 Lee, As always your lisp routines are a pleasure to use and helpful in more situations than one. Excellent stuff and thumb up!!! Quote
Lee Mac Posted March 18, 2013 Author Posted March 18, 2013 As always your lisp routines are a pleasure to use and helpful in more situations than one. Excellent stuff and thumb up!!! Many thanks Baber! The code for this program has actually since been updated to Version 1.3 and the latest version may be downloaded from my site here; the updated version will allow you to align objects to curves nested within Blocks or XRefs (nested to any level), in addition to primary objects. Cheers, Lee Quote
JGER19 Posted May 9, 2013 Posted May 9, 2013 Hi Lee, I just want to say your lisp routines are amazing. i am new to this world of lisp routines and i have a question regarding your block alignmemnt routine. Is it possible to select more than 1 block at a time to align with a curve? thanks in advance 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.