Author Topic: getfiled  (Read 2183 times)

0 Members and 1 Guest are viewing this topic.

DanB

  • Bull Frog
  • Posts: 367
getfiled
« on: March 28, 2007, 05:09:24 PM »
Code: [Select]
(setq AAA (getfiled "Select a file" "dwg" 128))

I have seen similar line code to the above and different variations of the numerical value at the end of the line (example here is 128). Can someone give me the run down on what this value does? I am piecing together some code here at the end of the day so I haven't looked real far but will hope to look more into this in the morning. Thanks

T.Willey

  • Needs a day job
  • Posts: 5251
Re: getfiled
« Reply #1 on: March 28, 2007, 05:19:12 PM »
Quote from: Acad Help
flags

An integer value (a bit-coded field) that controls the behavior of the dialog box. To set more than one condition at a time, add the values together to create a flags value between 0 and 15. The following flags arguments are recognized by getfiled:

1 (bit 0) Prompt for the name of a new file to create. Do not set this bit when you prompt for the name of an existing file to open. In the latter case, if the user enters the name of a file that doesn’t exist, the dialog box displays an error message at the bottom of the box.

If this bit is set and the user chooses a file that already exists, AutoCAD displays an alert box and offers the choice of proceeding with or canceling the operation.

4 (bit 2) Let the user enter an arbitrary file name extension, or no extension at all.

If this bit is not set, getfiled accepts only the extension specified in the ext argument and appends this extension to the file name if the user doesn’t enter it in the File text box.

8 (bit 3) If this bit is set and bit 0 is not set, getfiled performs a library search for the file name entered. If it finds the file and its directory in the library search path, it strips the path and returns only the file name. (It does not strip the path name if it finds that a file of the same name is in a different directory.)

If this bit is not set, getfiled returns the entire file name, including the path name.

Set this bit if you use the dialog box to open an existing file whose name you want to save in the drawing (or other database).

16 (bit 4) If this bit is set, or if the default argument ends with a path delimiter, the argument is interpreted as a path name only. The getfiled function assumes that there is no default file name. It displays the path in the Look in: line and leaves the File name box blank.

32 (bit 5) If this bit is set and bit 0 is set (indicating that a new file is being specified), users will not be warned if they are about to overwrite an existing file. The alert box to warn users that a file of the same name already exists will not be displayed; the old file will just be replaced.

64 (bit 6) Do not transfer the remote file if the user specifies a URL.

128 (bit 7) Do not allow URLs at all.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

DanB

  • Bull Frog
  • Posts: 367
Re: getfiled
« Reply #2 on: March 29, 2007, 07:42:47 AM »
Thank You!

T.Willey

  • Needs a day job
  • Posts: 5251
Re: getfiled
« Reply #3 on: March 29, 2007, 11:19:36 AM »
You're welcome.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.