Message 1 of 4
iLogic consolidate all open drawings

Not applicable
09-17-2018
01:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey i have a code created that when i have several drawings open it will copy each sheet to one drawing fil, this code works 90% of the time, but i sometimes get an error message when it cannot work, can any one help
Code:
SyntaxEditor Code Snippet
Dim oDoc1 As DrawingDocument oDoc1 = ThisApplication.ActiveDocument For Each oDoc in ThisApplication.Documents If oDoc IsNot oDoc1 Then 'make sure it's a drawing If oDoc.DocumentType = 12292 Then For Each oSheet In oDoc.Sheets oSheet.CopyTo (oDoc1) Next oDoc.Close(True) End If End If Next
Error Message
Error in rule: Consolidate Open Drawings, in document: Drawing1
The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))