Jump to content

Lisp to select leaders and change arrowsize


Recommended Posts

Posted

I'm trying to figure out how to select a group of leaders and manually change the arrowhead size by a certain factor. This is somewhat of a continuation from the results of this thread.

http://www.cadtutor.net/forum/showthread.php?t=43478

The sclall.lsp from LeeMac is good. I just need to select the leaders afterwards and manually change the arrowhead size by a set factor. So if I can figure out another lisp that will resize the arrowhead size, that would save me a few more steps than doing the properties menu method. Thanks.

Posted

Try this:

 

(defun c:aSze (/ *error* scl uFlag ActiveSelSet)
 (vl-load-com)

 (setq doc (cond (doc) ((vla-get-ActiveDocument
                          (vlax-get-Acad-Object)))))

 (defun *error* (msg)
   (and uFlag (vla-EndUndomark doc))
   (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")
       (princ (strcat "\n** Error: " msg " **")))
   (princ))
   
 (if (and (setq scl (getreal "\nSpecify Scale Factor: "))
          (ssget "_:L" '((0 . "*LEADER"))))
   (progn
     (setq uFlag (not (vla-StartUndoMark doc)))
     
     (vlax-for object (setq ActiveSelSet (vla-get-ActiveSelectionSet doc))
       (vlax-put-property object 'ArrowHeadSize
         (* (vlax-get-property object 'ArrowHeadSize) scl)))

     (vla-delete ActiveSelSet)
     (setq uFlag (vla-EndUndoMark doc))))

 (princ))
       

       

       
       

Posted

That is awsome Lee. Exactly what I wanted. Thanks so much. LeeMac to the rescue...AGAIN.:D

Posted
That is awsome Lee. Exactly what I wanted. Thanks so much. LeeMac to the rescue...AGAIN.:D

 

You're welcome Jeep :)

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