Message 1 of 4
CopyTo Drawing View Object issues

Not applicable
05-16-2018
10:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to create a VBA code to automate moving Drawing Views to another sheet. I am looping through a collection in a selection set and picking out the drawing view objects. It works fine until a Leader Note is inside the drawing view then it fails. So I created a filter to filter out the Leader Notes and it works great if the leader extends outside the Drawing View but when it is in the drawing view it fails. What are my options?
I catch the the Drawing view with
If itm.Type = kDrawingViewObject Then 'or 117441536 Call itm.CopyTo(DestSheet) End If
I catch the leaders that go outside the Drawing view with
If SelCol(counter).Type = kLeaderNoteObject Then 'or 117473024 For X = 1 To SelCol(counter).Leader.AllNodes.Count oObjCol.Add SelCol(counter).Leader.AllNodes(X).Position Next Set NLN = DestSheet.DrawingNotes.LeaderNotes.Add(oObjCol, SelCol(counter).FormattedText, SelCol(counter).DimensionStyle) End If