Reference for get_file_load_location
Get the location or filename to load. This is part of the reference section.
Arc
Buffer
Data
Dialog
get_file_load_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 load location with a callback. Note that some platforms require an active draw loop with a call to clear.
Snippet
Ask for a file load location with a callback that prints the selected filename.
sketch.get_dialog_layer().get_file_load_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.