Stop SketchUp from asking to save file before closing?
-
I am trying to open another file with code and don't want SketchUp to ask if I wan't to save before closing. The following code is what I am using;
` file = Sketchup.find_support_file("file.skp" , "Plugins/folder") ;
Sketchup.open_file file ;`
Is there a way to make this happen?
-
Why? do you not want to save before closing? why not just click 'no'?
-
Get out while you can Pete
-
-
Hi, currently working on a platformer type game and want to modify the 'KeyScene' plugin that I previously made to work as the menu interface for the game. Here is link to that plugin just in case; http://sketchucation.com/forums/viewtopic.php?t=49027
Lets say I click start and then select a level I don't want SketchUp to disrupt the flow of the game to open the file that contains that level.
-
Based on what I found at http://sketchucation.com/forums/viewtopic.php?f=180&t=23321&start=0
It looks like you could call a file revert viaSketchup.send_action(21485)
But this only seems to work if you were working with an existing file instead of a new file.
Alternatively, you could do something like performing a save-as to a junk location
Sketchup.active_model.save("C;/DeleteMe.skp")
But not ideal if you are working with a larger model that takes a while to save.
Hope this helps!
-
Thank you so much...This solved my problem!
The one I am using is your second suggestion since the revert method didn't produce what I wanted. The time it takes to save is not much so I am happy.
Again thanks!
Advertisement