Zorg Posted June 26, 2009 Posted June 26, 2009 You're more machine than remarl, lee Surely it would just be easier & quicker to draw all of one thing then do match props across everything/selected you've drawn? Quote
Lee Mac Posted June 26, 2009 Posted June 26, 2009 You're more machine than remarl, lee Hehe - perhaps I should change my avatar Quote
Butch Posted June 27, 2009 Author Posted June 27, 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 Great! These 3 thing would be more then enough. Have you looked at my drawing I previously attched. Did you mybe figured out why the hell the tool didnt work on those vertical lines:x Quote
Lee Mac Posted June 27, 2009 Posted June 27, 2009 Have you looked at my drawing I previously attched. Did you mybe figured out why the hell the tool didnt work on those vertical lines:x No, I don't use that "rapidshare" thing - could you not just "attach" the file? Quote
Butch Posted June 27, 2009 Author Posted June 27, 2009 0.25 MB max attach file size of .dxf/dwg file:( Quote
BIGAL Posted June 30, 2009 Posted June 30, 2009 Regarding not working when picking object your line butch if you look at the code you will see the objects currently supported. An obvious object to not work is a block, xref, 3d face solids etc maybe line is part of one of them. When I get time will add text and leaders also a not supported warning. Quote
Butch Posted June 30, 2009 Author Posted June 30, 2009 Lee Mac, did you maybe had any free time to update this? No hurrys ofcourse! Quote
Lee Mac Posted June 30, 2009 Posted June 30, 2009 Lee Mac, did you maybe had any free time to update this?No hurrys ofcourse! Making this work with MTEXT and such is not easy - I think at this point you are better off just using MATCH PROPERTIES. Quote
Butch Posted June 30, 2009 Author Posted June 30, 2009 :-( What abouth hatches and lines with their linetype and styles? That would be satisfying... Quote
Lee Mac Posted June 30, 2009 Posted June 30, 2009 :-(What abouth hatches and lines with their linetype and styles? That would be satisfying... It should already work with Lines - I shall see about hatches. Quote
Lee Mac Posted June 30, 2009 Posted June 30, 2009 The pattern name on a hatch is a read-only property, but this should alter the other properties: (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 nil) (PropMatch Obj (entlast))) ((eq "LWPOLYLINE" typ) (comInv "pline" nil) (PropMatch Obj (entlast))) ((eq "LINE" typ) (setq lEnt (entlast)) (comInv typ nil) (foreach ent (EntCol (if lEnt lEnt (entlast))) (PropMatch Obj ent))) ((eq "HATCH" typ) (setq lEnt (entlast)) (comInv typ t) (if (not (eq lEnt (entlast))) (PropMatch Obj (entlast)))) ((eq "VIEWPORT" typ) (setq lEnt (entlast)) (comInv "-vports" nil) (if (not (eq lEnt (entlast))) (PropMatch Obj (entlast)))))) (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 ViewportOn ShadePlot DisplayLocked GradientAngle GradientCentered GradientColor1 GradientColor2 GradientName HatchObjectType HatchStyle ISOPenWidth Origin PatternAngle PatternDouble PatternScale PatternSpace) (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 flag) (if flag (initdia)) (command (strcat "_." com)) (while (eq 1 (logand 1 (getvar "CMDACTIVE"))) (command pause))) Quote
Butch Posted July 1, 2009 Author Posted July 1, 2009 Lee Mac! Sorry for the delay! I tried the updated mapcom...i activated the command and slected an hatch, then the dialog window opened and I selected "Inherit properties" and clicked an hatch, then selected the internal point of an closed object. Any chance you could make this "inherit properties" be instant so you dont have to click it at all... p.s. any chance for this also to work wit construction lines? Quote
BIGAL Posted July 7, 2009 Posted July 7, 2009 Sorry to bother you Lee copied off the new version now arcs and circles dont work not sure why ? Kept the old one though. Quote
Lee Mac Posted July 7, 2009 Posted July 7, 2009 Sorry to bother you Lee copied off the new version now arcs and circles dont work not sure why ? Kept the old one though. Edited above code Quote
Butch Posted July 7, 2009 Author Posted July 7, 2009 Lee mac have you maybe put construction lines also? --- I think x-line is present in your code, sooooo the answer would be YES :-) Quote
Lee Mac Posted July 7, 2009 Posted July 7, 2009 Lee mac have you maybe put construction lines also? --- I think x-line is present in your code, sooooo the answer would be YES :-) Xlines were always in there butch Quote
Butch Posted July 7, 2009 Author Posted July 7, 2009 This is an increnible tool thanx to you! Maybe better to call it an arsenal of commands! Quote
flopo Posted November 13, 2009 Posted November 13, 2009 Lee Mac, can you modify the routine to work with dimension, text.... as many objects as possible Quote
rkent Posted November 13, 2009 Posted November 13, 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! Are you on subscription? Autodesk made this available recently, its called ADDSELECTED. Works very well. Quote
Glen Smith Posted November 13, 2009 Posted November 13, 2009 Are you on subscription? Autodesk made this available recently, its called ADDSELECTED. Works very well. rkent, tell me more of this "ADDSELECTED" you describe. Is it AutoCAD or only one of the verticals?My company is on subscription (I think), and I'm running 2010 Electrical, but ADDSELECTED gives me an unknown command. How long ago was this added and how do I go about getting it? Thanks. Glen 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.