Message 1 of 2
Copy Sheet macro doesn't work with crop
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I'm using vba macro to copy sheets, but for some reason if I have cropped views in sheet then I get this error or Inventor just crashes.
Any ideas why this is happens?
Copy sheet macro:
Sub Sheet_Kopio()
Dim oDoc As DrawingDocument
Set oDoc = ThisApplication.ActiveDocument
Dim tmpDoc As DrawingDocument
Set tmpDoc = ThisApplication.Documents.Add(kDrawingDocumentObject, , True)
Dim newSheet As Sheet
Set newSheet = oDoc.ActiveSheet.CopyTo(tmpDoc)
Call newSheet.CopyTo(oDoc)
tmpDoc.Close (True)
End Sub