Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Updating every sheet of every idw? (Inventor 2014)

2 REPLIES 2
Reply
Message 1 of 3
Heiko1985
442 Views, 2 Replies

Updating every sheet of every idw? (Inventor 2014)

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

2 REPLIES 2
Message 2 of 3
ewiggers
in reply to: Heiko1985

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

Message 3 of 3
Heiko1985
in reply to: ewiggers

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

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report