Butch Posted June 23, 2009 Posted June 23, 2009 Hello! Is it possible to double-click over a line, or dimesion, or a hatch and instantly start using the tool over wich you have double-clicked. So eg. you have a line thats on a layer 01,with its lineweight and linetype. You double-click over it, and you instantly have a line command active with all the previous settings that go with the line over wich you have double-clicked. Same goes for hatching, dimesion lines... This would be a great time saviour! Once I have my tool placed on drawing, I dont have to switch layers, maybe change settings, define hatch....just double-click over the egsisting item and your off! Quote
BIGAL Posted June 24, 2009 Posted June 24, 2009 You could pretty easy create a lisp or vba to just do what you want, regarding double clicking not sure. Once you invoke the program it could be set to continue till you force an exit pretty easy pick nothing. Maybe set the program to load from a single key press. (remap function key) It can be something simple also like type zz (z is lower left easy to find) Ps single pick required on object Quote
RFRUSSO Posted June 24, 2009 Posted June 24, 2009 I keep the properties dialog box open at all times for just that reason. Once you select an object there are all sorts of wonderful options that can be quickly modified. Quote
Tankman Posted June 24, 2009 Posted June 24, 2009 I keep the properties dialog box open at all times for just that reason. Once you select an object there are all sorts of wonderful options that can be quickly modified. Just off a wonderful months' vacation in Key West, FL. Missed the forums, Greetings forum members! I use the dialog box frequently, minimized on the sidebar, always ready to open and modify properties when I need to. Which is not too often but, often enough! Quote
RFRUSSO Posted June 24, 2009 Posted June 24, 2009 I use the dialog box frequently, minimized on the sidebar, always ready to open and modify properties when I need to. Which is not too often but, often enough! You sound like a man that needs a second screen. I don't know how I got through 8 years of drawing stuff with only 1! Quote
Butch Posted June 24, 2009 Author Posted June 24, 2009 Guys not helping me here :-( So maybe a LISP could do this, otherwise no way to do egsactly what I want? Quote
Lee Mac Posted June 24, 2009 Posted June 24, 2009 Butch, you would get more of a response in the LISP forum, but I shall see what I can do Quote
Lee Mac Posted June 24, 2009 Posted June 24, 2009 Something like this Butch? {Can be expanded if necessary} (defun c:MapCom (/ ent Obj lEnt) (vl-load-com) (while (setq ent (car (nentsel "\nSelect Object: "))) (setq Obj (vlax-ename->vla-object ent) typ (cdr (assoc 0 (entget ent)))) (cond ((vl-position typ '("CIRCLE" "ARC" "ELLIPSE" "SPLINE" "XLINE")) (comInv typ) (PropMatch Obj (entlast))) ((eq "LWPOLYLINE" typ) (comInv "pline") (PropMatch Obj (entlast))) ((eq "LINE" typ) (setq lEnt (entlast)) (comInv typ) (foreach ent (EntCol (if lEnt lEnt (entlast))) (PropMatch Obj ent))))) (princ)) (defun PropMatch (bObj dObj) (or (eq 'VLA-OBJECT (type bObj)) (setq bObj (vlax-ename->vla-object bObj))) (or (eq 'VLA-OBJECT (type dObj)) (setq dObj (vlax-ename->vla-object dObj))) (foreach prop '(Layer Linetype LinetypeScale Color Lineweight) (if (and (vlax-property-available-p bObj prop) (vlax-property-available-p dObj prop T)) (vlax-put-property dObj prop (vlax-get-property bObj prop))))) (defun EntCol (x / x) (if (setq x (entnext x)) (cons x (EntCol x)))) (defun comInv (com) (command (strcat "_." com)) (while (eq 1 (logand 1 (getvar "CMDACTIVE"))) (command pause))) Quote
Zorg Posted June 24, 2009 Posted June 24, 2009 Isn't that the same as match properties? MA defualt command Quote
Butch Posted June 24, 2009 Author Posted June 24, 2009 Lee Mac, its nopt working here :-( I get an tetxt saying select object, i tried selecting an line, selected it, but nothing happens :-( Treid also with few other objects but nothing :-( Every time the same promt "select object" Quote
Lee Mac Posted June 24, 2009 Posted June 24, 2009 Lee Mac, its nopt working here :-(I get an tetxt saying select object, i tried selecting an line, selected it, but nothing happens :-( Treid also with few other objects but nothing :-( Every time the same promt "select object" What is your CMDECHO set to Butch? It all works fine my end. Quote
Lee Mac Posted June 24, 2009 Posted June 24, 2009 Isn't that the same as match properties? MA defualt command Not quite - Match properties matches the properties of the object after it has been drawn, this does it whilst the object is being drawn. If it were me, I would use Match Properties - as it would have much better coding than anything I could make - but I am just following the OP's request. Quote
BIGAL Posted June 25, 2009 Posted June 25, 2009 Hey Lee tried it out works great! altered the 1st line to (defun c:ZZZ (/ ent Obj lEnt) and added it to our start up lisps so we can all try it out. Found a couple of things and I will have a go at adding and repaste here. Quote
Tankman Posted June 25, 2009 Posted June 25, 2009 You sound like a man that needs a second screen. I don't know how I got through 8 years of drawing stuff with only 1! I see quite well on a 36" LCD wall mounted, tilt 'n swivel, monitor! Room to spare however, I can't figure out why my prints are smaller? Quote
Lee Mac Posted June 25, 2009 Posted June 25, 2009 Hey Lee tried it out works great! altered the 1st line to(defun c:ZZZ (/ ent Obj lEnt) and added it to our start up lisps so we can all try it out. Found a couple of things and I will have a go at adding and repaste here. Excellent BigAl As I say, its only in preliminary stages - just to try out the idea - there's bound to be a few bits wrong Lee Quote
Butch Posted June 25, 2009 Author Posted June 25, 2009 What is your CMDECHO set to Butch? It all works fine my end. Its set to 1 Is that bad? Quote
Lee Mac Posted June 25, 2009 Posted June 25, 2009 Its set to 1Is that bad? No, I was hoping you'd say 0, so that I could tell you to set it to 1.. :wink: Does it not work on anything at all? Quote
BIGAL Posted June 26, 2009 Posted June 26, 2009 To Butch I saved the program and it works no problems. maybe re save it, copy the text and then paste it into Notepad not Word etc then save. Have had niggly problems with Word just use Notepad now only. To Lee looking at adding text and leaders, also was going to add a "This object can not be replicated" probably for Xref and 3D faces and any other object thats not added properly to list in the code. Quote
Butch Posted June 26, 2009 Author Posted June 26, 2009 o.k. I tried it again and in works on some objects. I dont know why but from some reasone the tool wasnt working on my "vertical line" (I marked them in my drawing attached). I realy dont get why the hell it not working on them. Otherwise it seems to be working fine. I know this was the first try but I woulf realy love if you could make this thing work on hatches, so it picks up hatch style and scale after you click over it and then just place a new hatch. Same goes for dimensions and mtext style and height. Lee Mac what do you think, could it be done? http://rapidshare.com/files/248765546/try.dwg.html Quote
Lee Mac Posted June 26, 2009 Posted June 26, 2009 I'm sure I could put a hell of a lot more into this tool. I just slapped together some code to begin with to see if the tool was how you envisioned it to be. But, if you are pleased with it, I can put more into it Btw, I don't even use Notepad, to first test LISPs, I just copy the code straight into the Visual LISP Editor, where it can be loaded and edited on the fly. 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.