Updating every sheet of every idw? (Inventor 2014)

Updating every sheet of every idw? (Inventor 2014)

Anonymous
Not applicable
626 Views
2 Replies
Message 1 of 3

Updating every sheet of every idw? (Inventor 2014)

Anonymous
Not applicable

Hi everybody,

 

I often have to change several assemblies (iam) at once which isn’t too difficult: I can open all of them at once, do the changes in each iam and then save and close them at once.

 

Now, these assemblies have a drawing (idw) each which I have to update afterwards. I can open all of them at once, too, and the first sheet will be updated automatically as soon as each idw is opened.

 

However, every idw has more than just one sheet in it. And the non-active sheets will not be updated when the idw is opened.

 

I’m looking for a solution using iLogic/VBA. So, all of the idws are opened and one of them is active. The macro shall simply update every sheet of the active idw, then switch to the next idw, update every sheet there, switch to the next idw … and so on until every idw has been completely updated.

 

I’m quite familiar with VBA in MS Excel, but I simply don’t know the correct commands in Inventor.

 

 

Can anyone help me, please?

Regards

Heiko1985

0 Likes
627 Views
2 Replies
Replies (2)
Message 2 of 3

EelcoWiggers
Enthusiast
Enthusiast

Hi Heiko,

 

I don't use it much but this sounds like a Task Scheduler job to me. Don't know if you ever used this but you can find it under the Windows button > All programs > Autodesk > Inventor "Version" > Tools.

 

Regards,

Eelco

0 Likes
Message 3 of 3

Anonymous
Not applicable

Thank you for your help, Eelco.

I took a look at the Task Scheduler but didn’t get along with it at all.

Luckily, I now found a solution myself using iLogic:

 

Sub update_sheets() 

Dim oapp As Inventor.Application
Set oapp = ThisApplication
Dim oDocument As Inventor.Document
Set oDocument = ThisApplication.ActiveDocument
Dim oSheet As Sheet

For Each oDocument In oapp.Documents.VisibleDocuments
    Name = oDocument.FullDocumentName
    For Each oSheet In oDocument.Sheets
    '    oSheet.Activate
        oSheet.Update
    Next
    oDocument.Save
    oDocument.Close
Next

End Sub

 

0 Likes