OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: Fred Tomke on June 20, 2008, 07:03:35 AM

Title: BrowseFolder
Post by: Fred Tomke on June 20, 2008, 07:03:35 AM
Hello,

this works very well.
(dcl_browsefolder "Wählen Sie das Projektverzeichnis: " "C:\\" "C:\\" 81)

But I want to see other drives, too. Then I would use
(dcl_browsefolder "Wählen Sie das Projektverzeichnis: " "C:\\" 81)
But unfortunately, I get an exception. What am I doing wrong?

Fred
Title: Re: BrowseFolder
Post by: owenwengerd on June 20, 2008, 10:02:07 AM
Currently, if you pass the first string argument, you must pass the second string argument as well. I will change this to accept only a single string argument.
Title: Re: BrowseFolder
Post by: Fred Tomke on June 20, 2008, 03:18:02 PM
Hello Owen,

the second string is useful if the user only shall select a folder below the preselected folder. Other drives and folders are not allowed. We had an OpenDCL training today and the "student" liked this very much. But we also tried to get the "Create new folder" button. But we didn't get this when leaving out the second string.

I hope it was understandable  :)

Fred
Title: Re: BrowseFolder
Post by: owenwengerd on June 20, 2008, 09:19:05 PM
Sorry, I'm not sure I understand.  Are you saying that passing an empty string is not the same as omitting the argument?
Title: Re: BrowseFolder
Post by: Fred Tomke on June 20, 2008, 11:35:13 PM
Yes, you're right that's different. I'll give you an example:

Case 1:
(dcl_browsefolder "Wählen Sie das Projektverzeichnis: " "D:\\bündig")

Case 2:
(dcl_browsefolder "Wählen Sie das Projektverzeichnis: " "D:\\bündig" "D:\\")

The second string allows only to select a folder only under "D:\\".

Interesting, isn't it?  :) It would be nice to keep it.

So my initial question was: what do I have to do to have the Create new folder button when I DON'T want to limit the folder selection.

work: (dcl_browsefolder "Wählen Sie das Projektverzeichnis: " "D:\\bündig" "D:\\" 81)
doesn't work: (dcl_browsefolder "Wählen Sie das Projektverzeichnis: " "D:\\bündig" 81)

How can I find the place in the code where this function is defined?
How can I debug that?

Fred
Title: Re: BrowseFolder
Post by: owenwengerd on June 21, 2008, 11:17:13 AM
Have you tried (dcl_browsefolder "Wählen Sie das Projektverzeichnis: " "D:\\bündig" nil 81)?
Title: Re: BrowseFolder
Post by: Fred Tomke on June 21, 2008, 02:31:59 PM
Thank you. Thats it! We should add this to the documentation.

Fred