Sanketh145
Automotive
thread560-440400
For the sake of completion, for anyone looking: The code works perfectly, IF the text has no leaders. If it has leaders, you need to delete the leaders in the duplicate text, . Add the below lines of code after dr_view.Activate:
Dim tmp_txt As DrawingText
Set tmp_txt = sel.Item(1).Value
Dim tmp_leaders As DrawingLeaders
Dim tmp_leader As DrawingLeader
Dim x(), y()
Set tmp_leaders = tmp_txt.leaders
Dim tmp_leader_LB
NbLeaders = tmp_leaders.Count
For i = 1 To NbLeaders
NbPts = tmp_leaders.Item(i).NbPoint
For j = 1 To NbPts
ReDim x(NbPts * 2 - 1)
Set tmp_leader = tmp_leaders.Item(1)
Set tmp_leader_LB = tmp_leader
Call tmp_leader_LB.GetPoints(x)
' Call CreatePoint(x, y)
Call tmp_leaders.Item(i).RemovePoint(1)
Next j
Next i
For the sake of completion, for anyone looking: The code works perfectly, IF the text has no leaders. If it has leaders, you need to delete the leaders in the duplicate text, . Add the below lines of code after dr_view.Activate:
Dim tmp_txt As DrawingText
Set tmp_txt = sel.Item(1).Value
Dim tmp_leaders As DrawingLeaders
Dim tmp_leader As DrawingLeader
Dim x(), y()
Set tmp_leaders = tmp_txt.leaders
Dim tmp_leader_LB
NbLeaders = tmp_leaders.Count
For i = 1 To NbLeaders
NbPts = tmp_leaders.Item(i).NbPoint
For j = 1 To NbPts
ReDim x(NbPts * 2 - 1)
Set tmp_leader = tmp_leaders.Item(1)
Set tmp_leader_LB = tmp_leader
Call tmp_leader_LB.GetPoints(x)
' Call CreatePoint(x, y)
Call tmp_leaders.Item(i).RemovePoint(1)
Next j
Next i