Mullileader how to change TextHeight

Mullileader how to change TextHeight

Anonymous
Not applicable
385 Views
2 Replies
Message 1 of 3

Mullileader how to change TextHeight

Anonymous
Not applicable

Please write a code how to change a text height "123"

I can't do this and find a sample.

 

I found that code in help for autocad , I added dogleg direction

 

Sub Example_Blockttribute()
' This example creates an MLeader object and gets and sets values for
' the block attribute type.
Dim vector(2) As Double
vector(0) = 1


Dim points(0 To 5) As Double
points(0) = 0: points(1) = 4: points(2) = 0
points(3) = 1.5: points(4) = 5: points(5) = 0

Dim i As Long

Dim oML As AcadMLeader
Set oML = ThisDrawing.ModelSpace.AddMLeader(points, i)
    oML.ContentType = acBlockContent
 '   oML.ContentBlockType = acBlockBox
  oML.ContentBlockType = acBlockCircle
  oML.SetDoglegDirection 0, vector
   oML.DogLegged = True
   oML.DoglegLength = 3

oML.ArrowheadSize = 0.3
Dim sBlock As String
    sBlock = oML.ContentBlockName

Dim o As AcadEntity

For Each o In ThisDrawing.Blocks(sBlock)
    If o.ObjectName = "AcDbAttributeDefinition" Then
Call oML.SetBlockAttributeValue(o.ObjectID, "123")
 '   MsgBox oML.GetBlockAttributeValue(o.ObjectID)
    End If
Next o
    Update
    ZoomExtents
End Sub

0 Likes
386 Views
2 Replies
Replies (2)
Message 2 of 3

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

could that be the solution for you?

oML.BlockScale = 5

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 3 of 3

Anonymous
Not applicable

I checked ,it works : 

Thank You for help

 

For Each o In ThisDrawing.Blocks(sBlock)
    If o.ObjectName = "AcDbAttributeDefinition" Then
Call oML.SetBlockAttributeValue(o.ObjectID, "123")
   oML.ScaleFactor = 5
    End If
Next o

 

 I would like to find out :

How  to change a text Height  (and other factors) inside a block attribute

 

 

0 Likes