CSharpBoy 发表于 2016-4-21 10:51:46

设置MLeader的文字的方向

Setting the direction of the MLeader text


问题:不管如何创建MLeader实体,文字总是在一边,如果做才能和ACAD生成MLeader实体一样?
解决方法:

Based on the inclination of the leader line, the “SetDogLeg” method can be used to specify the direction in which the MLeader text should appear.

            Dim activeDoc As Document = Application.DocumentManager.MdiActiveDocument
            Dim db As Database = activeDoc.Database
            Dim ed As Editor = activeDoc.Editor

            Dim ppr1 As PromptPointResult = ed.GetPoint(vbLf & "Specify leaderarrowhead location")
            If ppr1.Status <> PromptStatus.OK Then
                Return
            End If
            Dim startPoint As Point3d = ppr1.Value
            Dim ppo As New PromptPointOptions(vbLf & "Specify leader landing location")
            ppo.BasePoint = startPoint
            ppo.UseBasePoint = True
            Dim ppr2 As PromptPointResult = ed.GetPoint(ppo)

            If ppr2.Status <> PromptStatus.OK Then
                Return
            End If
            Dim endPoint As Point3d = ppr2.Value
            Dim blockText As String = "Autodesk"
**** Hidden Message *****

greatspark 发表于 2023-3-9 21:31:30

学习一下,谢谢

追风_ryYXY 发表于 2023-3-26 22:54:14

谢谢分享,学习一下

dnbcgrass 发表于 2023-3-27 08:08:43

回复学习学习,谢谢分享

niky_long 发表于 2023-10-1 10:47:23

学习以下,感谢分享

brainstorm 发表于 2023-10-31 00:22:46

感谢分享 学习学习
页: [1]
查看完整版本: 设置MLeader的文字的方向