Sam Jones Posted January 22, 2017 Share Posted January 22, 2017 How do I use GetFileN? It is defined in the custom reference as: FUNCTION GetFileN(title:STRING, defaultFolder:STRING, mask:STRING, VAR filename:STRING) 1. What is "title" 2. What is the “mask” I want to specify the folder that is displayed when GetFile() is used. I had hoped to do it with GetFileN() TIA (yet again). Sam Quote Link to comment
Pat Stanford Posted January 22, 2017 Share Posted January 22, 2017 defaultFolder is the Posix path to the folder you are interested in. Easiest way in many cases to get this is to use the GetFolderPath() with the proper code for the folder you are interested in. On the Mac this will give you back an HFS path (departed with colons (:)) Run this through the ConvertHSF2PosixPath command (note the misspelling of HSF not HFS.) If you want to build the path yourself you can access the root level of the disk with just '/'. To access my Desktop folder I used '/Users/Pat/Desktop' Procedure Test; Var S1:String; B1:Boolean; S2:String; Begin B1:=ConvertHSF2PosixPath(GetFolderPath(-15),S2); AlrtDialog(S2); B1:=GetFileN('Dialog Title',S2,'txt;vwx',S1); End; Run(Test); mask is a list of file extensions that you want to be selectable separated by semicolons (;) 'vwx' will return just Vectorworks files. 'vwx;txt' will return all Vectorworks files and all TXT files as selectable in the dialog. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.