Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
π« Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
Yet another SavePanel question
-
Hi everyone,
I have a savepanel question for you guys.
Is there any way to tell from the code if a savepanel was closed using "Cancel" or using "Ok"? Tried the documentation, didn't find any access to that particular thing.
Maybe you know if this sets some bit or something like that?Thanks a bundle,
- TaliG
-
The manual says it returns
nilif the user cancels. Is that not so? -
I think savepanel returns the selected path and filename as a String, or either false or nil when the Cancel button is used.
file = UI.savepanel if file # maybe check for other possible bad input, # do something useful with file. else # use hit cancel end -
I'm pretty sure I've tried these. I'll try it again...
-
Test the return value. The manual has been wrong before. It might be
falseor en empty string.
Advertisement