Reference for get_file_save_location
Get the location or filename to save. This is part of the reference section.
Arc
Buffer
Data
Dialog
get_file_save_location
Ellipse
Geo Utils
Image
Joystick (future)
Keyboard
Line
Mouse / Touchscreen
Pixel
Rectangle
Renderers
Shape
Sound (future)
Style
System
Text
Transform
Purpose
Get a file save location with a callback. Note that some platforms require an active draw loop with a call to clear.
Snippet
Ask for a file save location with a callback that prints the selected filename.
sketch.get_dialog_layer().get_file_save_location(lambda filename: print(filename))
Parameters
- callback: Callback invoked if the user selects a file location, passing a single string with the filename.
Availability
Available for Sketch2DWeb and Sketch2DApp. For Web, uses a simple prompt.