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 !
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 !
You can change two properties height and space factor:
~'J'~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
"The whole problem with the world is that fools and fanatics are always
so certain of themselves, and wiser people so full of doubts."
Bertrand Russell
Glad you got it working,
Cheers
~'J'~
"The whole problem with the world is that fools and fanatics are always
so certain of themselves, and wiser people so full of doubts."
Bertrand Russell