Jump to content

Recommended Posts

Posted

You're more machine than remarl, lee :lol:

 

Surely it would just be easier & quicker to draw all of one thing then do match props across everything/selected you've drawn?

  • Replies 40
  • Created
  • Last Reply

Top Posters In This Topic

  • Lee Mac

    14

  • Butch

    12

  • BIGAL

    5

  • RFRUSSO

    2

Top Posters In This Topic

Posted
You're more machine than remarl, lee :lol:

 

Hehe - perhaps I should change my avatar :P

Posted
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 :D

 

Great! :D

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

Posted
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? :huh:

Posted

0.25 MB max attach file size of .dxf/dwg file:(

Posted

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.

Posted

Lee Mac, did you maybe had any free time to update this?

No hurrys ofcourse!

Posted
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. :)

Posted

:-(

What abouth hatches and lines with their linetype and styles?

That would be satisfying...

Posted
:-(

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.

Posted

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)))               
                   
   

Posted

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?

Posted

Sorry to bother you Lee copied off the new version now arcs and circles dont work not sure why ? Kept the old one though.

Posted
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 :)

Posted

Lee mac have you maybe put construction lines also? --- I think x-line is present in your code, sooooo the answer would be YES :-)

Posted
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 :)

Posted

This is an increnible tool thanx to you!

Maybe better to call it an arsenal of commands!

  • 4 months later...
Posted

Lee Mac, can you modify the routine to work with dimension, text.... as many objects as possible :)

Posted
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.

Posted
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

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...