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: 

Save and Replace all for all levels - iLogic code

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Dai_Tech
255 Views, 3 Replies

Save and Replace all for all levels - iLogic code

Hello everyone,

 

With Save and Replace function just available for same level. I am trying to replace part file in difference level.

How to solve this problem using ilogic code. 


Problem:

Dai_Tech_0-1716180439933.png

=> result:

Dai_Tech_1-1716180617618.png

Thank all ^^

3 REPLIES 3
Message 2 of 4
johnsonshiue
in reply to: Dai_Tech

Hi! This could be related to an old thread.

 

https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-automatically-find-save-amp-replac...

 

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 3 of 4
Dai_Tech
in reply to: johnsonshiue

@johnsonshiue Thanks for your response. It is very useful for my projects.

I have another problem, when replacing item in all open assemblies

"CHECK ASSEMBLY " don't save with new item "ADSK-500000590.ipt". See video to understand more.

I tried with save2...

 

If you knows how to solve that, please help me

Thank you so much again!

 

Message 4 of 4
Dai_Tech
in reply to: Dai_Tech

It works. Must be used "Save2" for VisibleDocuments.

 

My code: 

On Error Resume Next

For Each oDoc In ThisApplication.Documents.VisibleDocuments
	oDoc.Update2
	oDoc.Save2
Next oDoc

 

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

Post to forums  

Autodesk Design & Make Report