Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

LISP Question... << About 'getfiled' >>

91 views
Skip to first unread message

Tony Tanzillo

unread,
Oct 19, 1998, 3:00:00 AM10/19/98
to
Windows filenames are case-preserving, but not case-
sensitive. That means that Windows preserves the case
of filenames, but ignores case when doing comparisons
or searches. If you give a file a name with mixed case,
it will retain that mixed case.

Kyoung-sik, LEE wrote:
>
> Hi, all....
>
> Please Let me Know how to solve this strange trouble.....
>
> Why the return value of (setq fname (getfiled "Select data file"
> "C:/demo/data/" "dat" 8))
> varies by case?
>
> In A.dwg or A computer :
> Return -> "c:/demo/data/(selected name).dat"
>
> In B.dwg or B computer :
> Return -> "(selected name).dat"
>
> Any help is appreciated....
> Thanks in advance........
>
> Kyoung-sik, LEE <sch...@hico.hyosung.co.kr>
> Steel Tower Design Team
> Hyosung Heavy Industries Co., Ltd.

--
/*********************************************************/
/* Tony Tanzillo Design Automation Consulting */
/* Programming & Customization for AutoCAD & Compatibles */
/* ----------------------------------------------------- */
/* tony.t...@worldnet.att.net */
/* http://ourworld.compuserve.com/homepages/tonyt */
/*********************************************************/

The "OLD MAN" - Bill Farmer

unread,
Oct 19, 1998, 3:00:00 AM10/19/98
to
I have found that this function appears to work just the opposite of what is
written in the customization guide. I quote "Flag value = 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 doesn't strip the path name if it finds that a file of the same name is
in a different directory.)"
Example: (getfiled "Select a Lisp File" "/acadr14/support/" "lsp" 8)
returns the following assuming I pick the lisp file in this directory -
"D:\\AcadR14\\SUPPORT\\3darray.lsp". If I issue the same statement and pick
a lisp file in a different directory for instance /Acadr14/acad.lsp it
returns this: "Acad.lsp". So it appears to me that the documentation is
incorrect.The following line from the Customization Manual is true.
"If this bit is not set, getfiled returns the entire file name,
including the path name."

This function also works the same way in R13. So I'm presuming it's an error
in the manual. Hope this helps.

Bill

Kyoung-sik, LEE wrote in message <70gt6d$8a...@adesknews2.autodesk.com>...

The "OLD MAN" - Bill Farmer

unread,
Oct 19, 1998, 3:00:00 AM10/19/98
to
It appears while I was researching this that Tony has given a somewhat
different answer. If I misinterpreted the meaning of the original post I beg
forgiveness for taking up space.

Bill
<snip>

Stephen L. Bowen

unread,
Oct 19, 1998, 3:00:00 AM10/19/98
to
It will also return full path if a file with the same name is found within
AutoCAD's search path.

Stephen L. Bowen
President, PowerLISP Solutions

Stephen Tate wrote:

> Lee
>
> Do you mean why does it sometimes include the path and sometimes not?
>
> I think it's because the full path is only returned if the folder containing
> the selected file is not defined within your AutoCAD search path.
>
> You can check with:
> (princ (getvar "acadprefix"))
> You may need to check your current directory too.
>
> To get round the problem, use (findfile ....) on whatever is returned by
> getfiled, that should always return the full path.
>
> --
> Stephen Tate
> Stephen Tate CAD, UK
> Anti-SPAM - For E-mail please use:
> stephe...@stcad.co.uk


Tony Tanzillo

unread,
Oct 19, 1998, 3:00:00 AM10/19/98
to
No - I was the one confused by the word "case" :-)

I nuked my response.

--

The "OLD MAN" - Bill Farmer

unread,
Oct 19, 1998, 3:00:00 AM10/19/98
to
Tony,
Thought my quarterheimers was kicking in again!<G> Anyway I think the
question has been answered a number of different ways. Have a good one!

Bill

Tony Tanzillo wrote in message <362C0571...@worldnet.att.net>...

Kyoung-sik, LEE

unread,
Oct 20, 1998, 3:00:00 AM10/20/98
to

Stephen Tate

unread,
Oct 20, 1998, 3:00:00 AM10/20/98
to

Kyoung-sik, LEE

unread,
Oct 20, 1998, 3:00:00 AM10/20/98
to
Thanks a lot, Stephen!!!!!! That works gooooooood!!!!!
I always remember your help.......... :)

Stephen L. Bowen 이(가) <362C05E0...@powerlisp.com>
메시지에서 작성하였습니다...


>It will also return full path if a file with the same name is found within

>AutoCAD's search path..........
> .........................

0 new messages