See the top rated post in this thread. Click here

Results 1 to 8 of 8

Thread: MULTILEADER question??

  1. #1
    Woo! Hoo! my 1st post
    Join Date
    2011-12
    Posts
    1
    Login to Give a bone
    0

    Red face MULTILEADER question??

    I hope I am posting this in the proper forum.

    I am trying to speed up my productivity and am looking for a little assistance.

    Is it possible to use a multileader to label a block? That question seems a little vague, so let me explain a little more...

    We tend to use Dynamic blocks for all our materials. We name those blocks a specific number (eg. P100).

    Is it possible to use a multileader to simply click on the block and have the text automatically change to the name of the block? (For example I click on the P100 block and the text in my leader now = P100)

    I've seen other drafting programs with this capability (/drool). But I am still using AutoCAD. I gave the internet a browse with no luck. But when in doubt check with Augi. Augi knows best .

  2. #2
    I could stop if I wanted to Iceberg's Avatar
    Join Date
    2008-12
    Location
    New Jersey
    Posts
    472
    Login to Give a bone
    0

    Default Re: MULTILEADER question??

    Welcome to AUGI..... and your first post....

    To my knowledge nothing like this exists.

    I know that you can add a "field" as your text option, something like:

    Field Category: Objects
    Named Object Type: Block (select block name)
    Name: choose format type

    I have not personally tried this out so I am not sure if it will update automatically if the block is changed or not. At the very least its something to experiment with.

    This sounds like a really good feature that should be in CAD, I would also recommend that you go and make a post on the CAD Wish List page about this idea.
    ~~ You can run all your life, but not go anywhere ~~

  3. #3
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,570
    Login to Give a bone
    1

    Default Re: MULTILEADER question??

    Quote Originally Posted by mmmm_standard666891 View Post
    Is it possible to use a multileader to simply click on the block and have the text automatically change to the name of the block? (For example I click on the P100 block and the text in my leader now = P100)
    Here's a quick LISP routine which prompt the user to select a single Block (dynamic or not), and single MLeader (on an unlocked layer), and proceeds to check for MTEXT ContentType, and the programmatically changes the MLeader Object's TextString Property accordingly... This routine also support 'undo' functionality:

    Code:
    (vl-load-com)
    
    (defun c:LBML () (c:LableBlockByMLeader))
    (defun c:LableBlockByMLeader (/ *error* block mleader oMLeader acDoc)
    
      (defun *error* (msg)
        (if acDoc
          (vla-endundomark acDoc)
        )
        (cond ((not msg))                                                   ; Normal exit
              ((member msg '("Function cancelled" "quit / exit abort")))    ; <esc> or (quit)
              ((princ (strcat "\n** Error: " msg " ** ")))                  ; Fatal error, display it
        )
        (princ)
      )
    
      (if
        (and (setq block (ssget ":S:E" '((0 . "INSERT"))))
             (setq mleader (ssget ":S:E:L" '((0 . "MULTILEADER"))))
             (= 2                                                           ; mtext only, no blocks
                (vla-get-contenttype
                  (setq oMLeader (vlax-ename->vla-object (ssname mleader 0)))
                )
             )
        )
         (progn
           (vla-startundomark
             (setq acDoc (vla-get-activedocument (vlax-get-acad-object)))
           )
           (vla-put-textstring
             oMLeader
             (vla-get-effectivename
               (vlax-ename->vla-object (ssname block 0))
             )
           )
         )
      )
      (*error* nil)
    )
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3630, Core i9-9900K 5.0GHz, 128GB RAM, Samsung 970 Pro M.2, 8GB NVIDIA Quadro P4000

  4. #4
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,570
    Login to Give a bone
    0

    Default Re: MULTILEADER question??

    Quote Originally Posted by mmmm_standard666891 View Post
    I hope I am posting this in the proper forum.
    I am unable to move this thread to the AutoLISP Forum, but perhaps one of my peers who does have permission(s) will be along shortly.
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3630, Core i9-9900K 5.0GHz, 128GB RAM, Samsung 970 Pro M.2, 8GB NVIDIA Quadro P4000

  5. #5
    Member
    Join Date
    2015-11
    Location
    Highlands ranch, CO
    Posts
    29
    Login to Give a bone
    0

    Default Re: MULTILEADER question??

    Hey BB, This routine worked great but no longer works in newer versions. Is there a simple fix to get it to work again?

    Thanks
    ~Greg

  6. #6
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL
    Posts
    3,448
    Login to Give a bone
    0

    Default Re: MULTILEADER question??

    Quote Originally Posted by greg.battin View Post
    Hey BB, This routine worked great but no longer works in newer versions. Is there a simple fix to get it to work again?

    Thanks
    ~Greg
    Just tested it in AutoCAD Civil 3D 2021 and it worked fine.
    It doesn't draw the multileader, you pick a block then a multileader to assign the block name (effectivename if it's a dynamic block).
    Tom Beauford P.S.M. - Civil 2020 on Windows 10 Enterprise
    Design Analysis - Leon County Public Works/Engineering Wrap [CODE] tags around selected text
    2280 Miccosukee Rd. Tallahassee, FL 32308-5310
    Ph# (850)606-1516 Home Page

  7. #7
    Member
    Join Date
    2015-11
    Location
    Highlands ranch, CO
    Posts
    29
    Login to Give a bone
    0

    Default Re: MULTILEADER question??

    Thanks for testing Tom.

    I haven't used it in years so I didn't remember how it works. Someone who I passed it on to, asked me to fix it and it turns out we should have simply read the prompts in the command line...

    Thanks again,
    ~Greg

  8. #8
    AUGI Addict madcadder's Avatar
    Join Date
    2000-11
    Location
    Too far from the beach
    Posts
    1,019
    Login to Give a bone
    0

    Default Re: MULTILEADER question??

    With a few additions it seems like it should be able to do what the op wanted...
    Select a block
    Capture info
    Start leader
    Place leader
    Place block name as text
    End

Similar Threads

  1. MultiLeader Question
    By gonzo479 in forum AutoCAD Annotation
    Replies: 0
    Last Post: 2015-04-16, 03:46 PM
  2. multileader
    By john.buckerfield in forum AutoCAD General
    Replies: 9
    Last Post: 2012-02-16, 03:13 PM
  3. 2011: Multileader in layer
    By Devil in forum AutoCAD General
    Replies: 7
    Last Post: 2010-11-01, 09:04 PM
  4. multileader with text
    By krykaya in forum CAD Standards
    Replies: 4
    Last Post: 2008-11-13, 08:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •