ilogic save command not working

ilogic save command not working

murugasubi
Enthusiast Enthusiast
731 Views
8 Replies
Message 1 of 9

ilogic save command not working

murugasubi
Enthusiast
Enthusiast

Hi Dear, 

I have created an I logic form and updating assembly which is fine. Now I am saving the assembly using ilogic rule, but even after running the save rule, the assembly document is asking to save again. I have to click yes > yes to all >, OK, then it is saving. I want to skip the save prompt. Assembly and sub-assembly have to be saved automatically. I used the below-shown code for saving the assembly and sub-assembly and parts.

 

Dim Adoc As AssemblyDocument
Adoc = ThisApplication.ActiveDocument
Adoc.Save
Adoc.Save2

please refer the attached image 1 and 2 and guide me to avoid the save prompt.

 

Thanks

Murugan

 

0 Likes
Accepted solutions (2)
732 Views
8 Replies
Replies (8)
Message 2 of 9

theo.bot
Collaborator
Collaborator

To skip the prompt you can simply set your application options:

 

theobot_0-1634119291725.png

 

0 Likes
Message 3 of 9

murugasubi
Enthusiast
Enthusiast

Hi, Thank you for your response. I tried your method, but still, a prompt message is coming while closing the assembly and I pressed yes in the prompt, it's asking me to do save as. Please refer the attached image.

 

Regards,

Murugan

0 Likes
Message 4 of 9

theo.bot
Collaborator
Collaborator

With your code is nothing wrong. I think it's model related.

Are there any other rules trigger by save events? Can you share your model?

0 Likes
Message 5 of 9

murugasubi
Enthusiast
Enthusiast

Hi, Model attached..

Steps to run,

1. open the Create New Pallet Rack .iam file

2. Enter the JOB name and number  (This will copy the model from template folder to workspace folder in the name of project number)

3. Change the height, width, and weight

4. Click on the save (Here  I am getting this problem).

 

Actually, I am new to Ilogic, if there is any simple method, please guide me.

 

Regards,

Murugan

0 Likes
Message 6 of 9

theo.bot
Collaborator
Collaborator

If you use save2, you need to add the "savedependents as boolean" to save all files. I've tested it and after the save you can close the file without a prompt for a save.

On Error Resume Next

Dim Adoc As AssemblyDocument
Adoc = ThisApplication.ActiveDocument
'Adoc.Save
Adoc.Save2(True)

 

0 Likes
Message 7 of 9

murugasubi
Enthusiast
Enthusiast

Hi,  I have tried  save2(true) , but still asking me to do save as while closing.  I have added adoc.close at last. It's closing without any prompt, but the model is not getting saved.

Adoc.Save2(True)

 

Can you please rewrite the code correctly and send back the model to me?

 

Regards,

Murugan

0 Likes
Message 8 of 9

theo.bot
Collaborator
Collaborator
Accepted solution

I've tested this in two versions of inventor and there is nothing wrong with your model and codes. But i see that you are saving in google drive. can you please test with your data on a local drive. I've seen issues with onedrive as well in the past. 

Message 9 of 9

murugasubi
Enthusiast
Enthusiast
Accepted solution

Yes, @theo_bot, You are correct.  I tried it from the local drive it is working well.  Thanks a lot for your support.

 

0 Likes