Results 1 to 4 of 4

Thread: Help me FIXO

  1. #1
    Member
    Join Date
    2012-06
    Posts
    27
    Login to Give a bone
    0

    Default Help me FIXO

    How do I manipulate this variable by vb6 or vba to change value ?
    I would like change a lot of mleader on graphic screen and I intend change all in the same time.
    Is it possible ?

    mleader_2.PNG

    Thanks !

  2. #2
    AUGI Addict fixo's Avatar
    Join Date
    2005-05
    Location
    Pietari, Venäjä
    Posts
    1,269
    Login to Give a bone
    0

    Default Re: Help me FIXO

    You can change two properties height and space factor:

    Code:
    Public Sub ChangeLineSpaceFactor()
        
        Dim pickPt
        Dim oEnt As AcadEntity
        Dim oLeader As AcadMLeader
         Dim txtHgt As Double
     Dim dblLts As Double
          Dim setObj As AcadSelectionSet
         Dim setColl As AcadSelectionSets
         Dim setName As String
         Dim gpCode(0) As Integer
         Dim dataValue(0) As Variant
         Dim dxfcode, dxfdata
    
         gpCode(0) = 0
         dataValue(0) = "MULTILEADER"
         dxfcode = gpCode: dxfdata = dataValue
         setName = "$MleaderSelect$"
         
      On Error GoTo Err_Control
      
           With ThisDrawing
              Set setColl = .SelectionSets
              For Each setObj In setColl
                   If setObj.Name = setName Then
                        .SelectionSets.Item(setName).Delete
                        Exit For
                   End If
              Next
              Set setObj = .SelectionSets.Add(setName)
         End With
     
         setObj.SelectOnScreen dxfcode, dxfdata
         setObj.Highlight True
         
         MsgBox "Selected: " & CStr(setObj.Count & " mleaders")
         If setObj.Count > 0 Then
         ' >> do your changes here :
         For Each oEnt In setObj
              Set oLeader = oEnt
              Set oLeader = oEnt
        txtHgt = oLeader.TextHeight
        dblLts = oLeader.LinetypeScale
          oLeader.TextHeight = txtHgt * 6
      oLeader.LinetypeScale = dblLts * 6
         Next
     
     
        End If
    
    Err_Control:
        If Err.Number <> 0 Then
        MsgBox Err.Description
        End If
    End Sub
    ~'J'~

  3. #3
    Member
    Join Date
    2012-06
    Posts
    27
    Login to Give a bone
    0

    Default Re: Help me FIXO

    Thanks very much !
    "You are the Man"

  4. #4
    AUGI Addict fixo's Avatar
    Join Date
    2005-05
    Location
    Pietari, Venäjä
    Posts
    1,269
    Login to Give a bone
    0

    Default Re: Help me FIXO

    Glad you got it working,

    Cheers

    ~'J'~

Posting Permissions

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