Jump to content

[Lisp] Browse for folder question


ziele_o2k

Recommended Posts

Hi,

 

I found Browse for folder Lisp at Lee Mac's site but I have one question.

Is there any way to get access to folders above my root directory?

And if there is no way, could somone explain me why (as process of educating my lisp skills :) )

Link to comment
Share on other sites

I found Browse for folder Lisp at Lee Mac's site but I have one question.

Is there any way to get access to folders above my root directory?

And if there is no way, could somone explain me why (as process of educating my lisp skills :) )

 

I'm guessing that you are trying to display the folder selection prompt initialised at a given default directory, whilst still allowing the user to select any folder?

 

Unfortunately I am not aware of any way to achieve this - my Browse for Folder function is simply an AutoLISP wrapper for the BrowseForFolder method of the Windows Shell Object, therefore, the behaviour of the dialog is controlled by this method and cannot be altered by the AutoLISP calling function (except through the use of parameters).

 

As noted in the MSDN documentation, the root directory parameter is designed to restrict the user to browsing beneath a given root directory:

 

The root folder to use in the dialog box. The user cannot browse higher in the tree than this folder. If this value is not specified, the root folder used in the dialog box is the desktop.
Link to comment
Share on other sites

I'm guessing that you are trying to display the folder selection prompt initialised at a given default directory, whilst still allowing the user to select any folder?

 

Yes!

Unfortunately I am not aware of any way to achieve this - my Browse for Folder function is simply an AutoLISP wrapper for the BrowseForFolder method of the Windows Shell Object, therefore, the behaviour of the dialog is controlled by this method and cannot be altered by the AutoLISP calling function (except through the use of parameters).

 

As noted in the MSDN documentation, the root directory parameter is designed to restrict the user to browsing beneath a given root directory:

I searched web and I figured out that for my purpose would be usefull function SHBrowseForFolder, but usage of this function isn't clear to me, so i will live with current solution.

Thank you Lee for directing me where to search answers.

 

As always, sorry for my english :)

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...