iLogic consolidate all open drawings

iLogic consolidate all open drawings

Anonymous
Not applicable
321 Views
3 Replies
Message 1 of 4

iLogic consolidate all open drawings

Anonymous
Not applicable

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))

0 Likes
322 Views
3 Replies
Replies (3)
Message 2 of 4

chandra.shekar.g
Autodesk Support
Autodesk Support

@Anonymous,

 

iLogic code is working fine in Inventor 2019.1 version. Please notify the reproducible steps to get error and share the steps.

 

We will try to simulate the error with reproducible steps and investigate further.

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 3 of 4

Anonymous
Not applicable

From my investigation i believe that it my be caused by multiple scenarios, e.g. resolved links missing, the model not being at the 'master ' stage, the assembly name being incorrect on the model, i think the code is fine, and i think the model files require investigating. 

0 Likes
Message 4 of 4

chandra.shekar.g
Autodesk Support
Autodesk Support

@Anonymous,

 

Can you please provide sample files to investigate which will help to reproduce error?

 

Please make sure that files are non confidential.

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes