AddLeader question

AddLeader question

Anonymous
Not applicable
411 Views
8 Replies
Message 1 of 9

AddLeader question

Anonymous
Not applicable
Why is it that if you use Qleader in autocad it will use your current dimension style as the means to draw your leader, and when you use the addleader method it wants you to specify everything. Is there something i'm missing so that you can get the Mtext and LeaderObject to use the same dimension style as in the qleader.
0 Likes
412 Views
8 Replies
Replies (8)
Message 2 of 9

Anonymous
Not applicable
AddLeader doesn't add a QLeader but rather the Dimension mode's Leader.

--
R. Robert Bell


wrote in message news:5413807@discussion.autodesk.com...
Why is it that if you use Qleader in autocad it will use your current
dimension style as the means to draw your leader, and when you use the
addleader method it wants you to specify everything. Is there something i'm
missing so that you can get the Mtext and LeaderObject to use the same
dimension style as in the qleader.
0 Likes
Message 3 of 9

Anonymous
Not applicable
So what are my options?
0 Likes
Message 4 of 9

Anonymous
Not applicable
If you want a QLeader, Visual LISP. I do not know if .NET will give you
this.

--
R. Robert Bell


wrote in message news:5414568@discussion.autodesk.com...
So what are my options?
0 Likes
Message 5 of 9

Anonymous
Not applicable
Well is there a way i can read a variable of a current dimension style so that i can set the variables within the add leader method?
0 Likes
Message 6 of 9

Anonymous
Not applicable
Of course.

Sub Test()
With ThisDrawing.ModelSpace
Dim myTextPt(0 To 2) As Double
myTextPt(0) = 1.25: myTextPt(1) = 1: myTextPt(2) = 0

Dim myText As AcadMText
Set myText = .AddMText(myTextPt, 1, "123")
myText.Height = ThisDrawing.GetVariable("DimTxt")
myText.StyleName = ThisDrawing.GetVariable("DimTxSty")
myText.AttachmentPoint = acAttachmentPointMiddleLeft
myText.InsertionPoint = myTextPt

Dim myPts(0 To 8) As Double
myPts(0) = 0: myPts(1) = 0: myPts(2) = 0
myPts(3) = 1: myPts(4) = 1: myPts(5) = 0
myPts(6) = myTextPt(0): myPts(7) = myTextPt(1): myPts(8) = myTextPt(2)

.AddLeader myPts, myText, acLineWithArrow
End With
End Sub





--
R. Robert Bell


wrote in message news:5415117@discussion.autodesk.com...
Well is there a way i can read a variable of a current dimension style so
that i can set the variables within the add leader method?
0 Likes
Message 7 of 9

Anonymous
Not applicable
If i am understanding correctly, the code you gave me the variable your getting the value of would have to be the current dimension style. Is there a way to specify which dimension style to get the variable from?
0 Likes
Message 8 of 9

Anonymous
Not applicable
Here's an example....

Standard = Current
Style1
Style2
Style3 <--- Get Variable from this DIM Style
0 Likes
Message 9 of 9

Anonymous
Not applicable
Not without making it current. And in your OP you did say "use your current
dimension style".

--
R. Robert Bell


wrote in message news:5416530@discussion.autodesk.com...
Here's an example....

Standard = Current
Style1
Style2
Style3 <--- Get Variable from this DIM Style
0 Likes