Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
Maplets[Utilities][GetFile] - flexible file selection dialog utility
Calling Sequence
GetFile(opts)
GetFile[refID](opts)
Parameters
opts
-
equation(s) of the form option=value; where option is one of approvecaption, approvecheck, directory, filefilter, filename, filterdescription, height, reference, resizable, title, or width; specify options for the Maplet application
refID
name or string; reference to the element
Description
The GetFile(opts) calling sequence displays a file dialog that allows the user to choose a file. The value returned is the string corresponding to the chosen file. If a file is not selected, NULL is returned.
This is a front-end to the FileDialog command. As such, leading and trailing spaces in filenames are automatically removed when a file is selected, and quoted filenames are also handled correctly.
Optionally, the GetFile utility validates the existence of a file.
Options
The opts argument can contain one or more of the following equations that set Maplet application options.
approvecaption = string or symbol
The text that appears on the button that is clicked to select the file. By default, the value is Open.
approvecheck = true or false
Indicates whether the existence of the file should be checked before exiting the Maplet application. By default, the value is true. If this is set to true, and the file is not present, an error dialog indicating this is displayed, and the Maplet application does not exit until a file is correctly chosen or the 'Cancel' button is pressed.
directory = string or symbol
Initial directory in which the file dialog opens.
filefilter = string or symbol
The extension of the files that display. By default, the value is "*", that is, all files are shown. It can also be used with other extensions, for example, "mws", "m", or "mpl".
filename = string or symbol
Initial filename when the file dialog opens. By default this is null.
filterdescription = string or symbol
A description of the filefilter. By default, this is all files.
height = posint
The height of the file dialog in pixels.
resizable = true or false
Whether the file dialog is resizable. By default this is true.
reference = name or string
A reference for the GetFile element.
If the reference is specified by both an index, for example, GetFile[refID], and in the calling sequence, an error results.
title = string or symbol
Specifies the Maplet application title. By default, the title is Get File.
width = posint
The width of the file dialog in pixels.
Examples
A file open dialog that checks for the existence of a file before exiting.
See Also
Maplets[Elements], Maplets[Elements][FileDialog], Maplets[Examples][GetFile], Maplets[Utilities], Overview of Maplet Applications
Download Help Document