ClockWerX Posted June 9, 2003 Share Posted June 9, 2003 Hi everyone, I will appreciate it when you can help me with the following problem. I use Vectorworks 9.5.1. I have a script which has to set the file location where all my scripts will store and retrieve its information. The files created in VectorScript are in text format. Now I have to give the user a dialog where he can choose the directory in which the files will be stored. I used GetFile, GetFolderPath but none of those functions do what I expect. The function GetFile needs a file to open. It is my intention to only get the folder (directory) path because even when there is no file in that directory I have to get the path. Now I have two questions : 1. Is there a function which let the user only choose a directory instead of a file? 2. Is there a method in VectorScript which will let me show the directory structure on the hard discs in a listbox? I will appreciate your help very much and I thank you in advance. Have a nice day! Friendly greetings, Chrissy Dessel Belgium Europe email : kristiaan.verberne@skynet.be Quote Link to comment
Jason33 Posted June 10, 2003 Share Posted June 10, 2003 Hello, As far as I can tell you are limited to the PUTFILE(commentsring,defaultstring:STRING; VAR filename:STRING) procedure. This gives you a standard dialog which determines the file, and destination. The filename variable contains the entire file path. I'm pretty sure that you can't get the path only from vectorscript without placing the file first. example: PROCEDURE TestWrite; VAR filename :STRING; BEGIN PUTFILE('Name File & Pick Folder','My File',filename); ReWrite(filename); WriteLn('Hello!'); WriteLn(''); WriteLn(filename); WriteLn(''); WriteL('Goodbye!'); Close(fiename); END; RUN(TestWrite); I hope this is helpful, -Jason 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.