Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

thread560-440400 For the sake of

Status
Not open for further replies.

Sanketh145

Automotive
Jan 22, 2019
2
IN
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top