Results 1 to 7 of 7

Thread: mleader "Always Left Justify"

  1. #1
    Active Member
    Join Date
    2002-05
    Posts
    72
    Login to Give a bone
    0

    Question mleader "Always Left Justify"

    I am trying to put together a little routine to automatically reset the company standard multileader values. I have hit a brick wall with the setting "Always Left Justify" (checkbox on the contents tab of the oem interface). I thought that .TextJustify might be the method but keep running into brick walls, it seems that this part of 2008 hasn't been finished (you can't even purge a mleader style from the command line).

    This is a chunk of the code I have so far but this justification thing has stalled me. Any ideas?

    Code:
    Dim oDict As AcadDictionary
       Set oDict = ThisDrawing.Dictionaries.Item("ACAD_MLEADERSTYLE")
    
       Dim i As Long
         For i = 0 To oDict.Count - 1
          Dim oObj As acadObject
          Set oObj = oDict.Item(i)
          If oObj.ObjectName = "AcDbMLeaderStyle" Then
              Dim oMLS As AcadMLeaderStyle
              Set oMLS = oObj
              If oMLS.Name Like "XYZ Multileader Standard" Then
                    oMLS.LeaderLineType = acStraightLeader
                    oMLS.LeaderLineColor.ColorIndex = acMagenta
                    oMLS.LeaderLineWeight = acLnWt015
                    oMLS.ArrowSize = 0.125
                    oMLS.BreakSize = 0.125
                    oMLS.MaxLeaderSegmentsPoints = 3
                    oMLS.EnableLanding = True
                    oMLS.DoglegLength = 0.125 'landing distance
                    oMLS.Annotative = True
                    oMLS.ContentType = acMTextContent
                    oMLS.TextStyle = "UMA Text Standard"
                    oMLS.TextAngleType = acHorizontalAngle
                    oMLS.TextColor.ColorIndex = acByLayer
                    oMLS.TextHeight = 0.09375
                    oMLS.TextLeftAttachmentType = acAttachmentMiddleOfTop
                    oMLS.TextRightAttachmentType = acAttachmentMiddleOfBottom
                    oMLS.LandingGap = 0.03125
    Last edited by Opie; 2007-07-13 at 02:48 AM. Reason: [code] tags added

  2. #2
    Active Member
    Join Date
    2002-05
    Posts
    72
    Login to Give a bone
    0

    Default Re: mleader "Always Left Justify"

    Well the only work around I found was to delete the mleader style then insert a block with the style defined and the "Always Justify Left" unselected. Not elegant but work for now until I find a way to do it better.

  3. #3
    I could stop if I wanted to
    Join Date
    2002-02
    Location
    Kansas
    Posts
    487
    Login to Give a bone
    0

    Default Re: mleader "Always Left Justify"

    if you use the Object Browser in vibe it show that
    Code:
    oMLS.TextAlignmentType = acLeftAlignment
    Would set the text alignment to left alignment

  4. #4
    Active Member
    Join Date
    2002-05
    Posts
    72
    Login to Give a bone
    0

    Default Re: mleader "Always Left Justify"

    But I don't want it set left and I can't find/figure out what the other value is.

  5. #5
    I could stop if I wanted to
    Join Date
    2002-02
    Location
    Kansas
    Posts
    487
    Login to Give a bone
    0

    Default Re: mleader "Always Left Justify"

    Quote Originally Posted by kdayman
    But I don't want it set left and I can't find/figure out what the other value is.
    Use the Object Browser to check the value you can set TextAlignmentType to
    0= acLeftAlignment
    1= acCenterAlignment
    2= acRightAlignment

  6. #6
    Active Member
    Join Date
    2002-05
    Posts
    72
    Login to Give a bone
    0

    Default Re: mleader "Always Left Justify"

    Thank for the information and the tip!

  7. #7
    100 Club
    Join Date
    2015-11
    Location
    Fairbanks, AK
    Posts
    136
    Login to Give a bone
    0

    Default Re: mleader "Always Left Justify"

    In your code, how are you determining the arrowhead block and the text frame? Are the values for this available under the developer help?

    Here are the two lines that are something like what I think are needed, but do not know the values to set them properly.

    oMLS.ArrowHead = "(Where is this symbol called from)"
    oMLS.TextFrame = "(Is this True / False for it to be on / off?)"


    Also, I am needing to know how to access the active text style and pass it to the mleader text style.

    I do not know VBA that well and any help is appreciated.

    Thanks in advance.

Similar Threads

  1. 2012: Revit Icon "R Logo" in top left screen errors (Not blackout error)
    By rbcameron1 in forum Revit Architecture - General
    Replies: 0
    Last Post: 2012-09-27, 01:42 PM
  2. Replies: 0
    Last Post: 2012-06-06, 11:54 AM
  3. 2011: "Fit" justification in attribute changes to "Left"
    By pmedina in forum AutoCAD General
    Replies: 0
    Last Post: 2011-08-30, 01:01 PM
  4. I wish the Edit Baluster Placement dialog had an additional justify option of "shrink to fit"
    By revit.wishlist1942 in forum Revit Architecture - Wish List
    Replies: 0
    Last Post: 2008-06-19, 03:55 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
  •