Results 1 to 2 of 2

Thread: Multileader Alignment

  1. #1
    100 Club
    Join Date
    2015-09
    Posts
    154
    Login to Give a bone
    0

    Default Multileader Alignment

    Hi,

    I am trying to align mleaders in a simple lisp file. The lisp file creates the mleaders and then using "mleaderalign" command I am trying to align them using spacing.
    The problem is when I have to choose the base mleader to create the spacing from. I cannot seem to select it. I have tried several variations without success. Does anyone have any ideas?
    I want if possible to avoid the user having to select it. Thanks

    Code:
    (defun c:Test (/ MLDRS ML1)
    
    (command "_mleader" "_ov" "11,9.5" "16,9.5" "Some Text here, and a bit more here" "9,7.5" "")
    (setq ML1 (ssget "_L"))
        
    (command "_mleader" "ü" "11,8.5" "16,8.5" "Some Text here, and a bit more here and then some more" "9,6.5" "")
    
    (command "_mleader" "ü" "11,7.5" "16,7.5" "Some Text here, and a bit more here and that should be enough" "9,5.5" "")
    
    (setq MLDRS (ssget "_X" '((0 . "Multileader"))))
    
      (command "_mleaderalign" MLDRS "" "_o" "_s" "1" ML1 "-1")
      )

  2. #2
    100 Club
    Join Date
    2015-09
    Posts
    154
    Login to Give a bone
    0

    Lightbulb Re: Multileader Alignment

    For anyone interested, I have solved this for my needs, at least for what I want anyway.

    The coordinates and text for each mleader are actually known variables that are read from excel in this case.

    If multileader that I want to select for the mleaderalign is the last one created then when I make my selection set Autocad sets a temporary UCS at this multileader when giving the user the option to select the multileader to use as the base mleader for the spacing, that means I can select the multileader by entering coordainate point "0,0".

    Probably not the most elegant solution but at the moment it works for me.

    Code:
    (defun c:Test (/ MLDRS ML1)
    
    (command "_mleader" "_ov" T2L T2R TXT2 "")
        
    (command "_mleader" "_ov" T3L T3R TXT3 "")
    
    (command "_mleader" "_ov" T1L T1R TXT "")
    
    (setq MLDRS (ssget "_X" '((0 . "Multileader"))))
    
     (command "_mleaderalign" MLDRS "" "_o" "_s" "1" "0,0" "-1")
     )
    Last edited by feargt; 2013-05-24 at 06:15 AM. Reason: solution

Similar Threads

  1. 2012: How to create points on LHS alignment which are at even chainage w.r.t the main centreline alignment
    By gary.chan.kc355500 in forum AutoCAD Civil 3D - Alignments
    Replies: 2
    Last Post: 2013-04-25, 07:25 PM
  2. multileader
    By john.buckerfield in forum AutoCAD General
    Replies: 9
    Last Post: 2012-02-16, 03:13 PM
  3. Alignment Station label that is perpendicular to alignment
    By corboto in forum AutoCAD Civil 3D - Alignments
    Replies: 4
    Last Post: 2010-05-20, 10:43 PM
  4. Grading alignment to alignment..
    By whf in forum AutoCAD Civil 3D - Grading
    Replies: 4
    Last Post: 2009-05-15, 09:08 PM
  5. Replies: 7
    Last Post: 2007-05-31, 01:14 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
  •