| Author |
Message |
Jason Piercey
Guest
|
Posted:
Thu Dec 23, 2004 1:03 am Post subject:
browseForFolder return values |
|
|
Using the code Tony posted here:
http://tinyurl.com/55q9k
or here if you prefer the longer link
http://groups-beta.google.com/group/autodesk.autocad.customization/msg/b7d8dcd2de543f57
If you select "My Computer" you get a return value of
something similar to the following
"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
Is there some benefit to allowing this type of return value?
I mean, what can one programmatically do with such a
value or does it not contain any "special hidden secrets"?
I was thinking about modifying it just a little to include
something like this to ensure that a path is returned.
(wcmatch <return value> "@`:\\*")
Thoughts/opinions?
--
Autodesk Discussion Group Facilitator
|
|
| Back to top |
|
 |
Tony Tanzillo
Guest
|
Posted:
Thu Dec 23, 2004 2:22 am Post subject:
Re: browseForFolder return values |
|
|
The third argument to the BrowseForFolder method of the file system
object, is supposed to allow options that prevent the user from selecting
items that do not represent folders, but on my system (XP SP2) I have
not been able to get them to work.
The BROWSEINFO structure documentation in MSDN enumerates the
flags that you can pass, but the don't appear to work from Visual
LISP, and I don't know why.
"Jason Piercey" <Jason AT atreng DOT com> wrote in message news:41c9d29a$1_3@newsprd01...
| Quote: | Using the code Tony posted here:
http://tinyurl.com/55q9k
or here if you prefer the longer link
http://groups-beta.google.com/group/autodesk.autocad.customization/msg/b7d8dcd2de543f57
If you select "My Computer" you get a return value of
something similar to the following
"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
Is there some benefit to allowing this type of return value?
I mean, what can one programmatically do with such a
value or does it not contain any "special hidden secrets"?
I was thinking about modifying it just a little to include
something like this to ensure that a path is returned.
(wcmatch <return value> "@`:\\*")
Thoughts/opinions?
--
Autodesk Discussion Group Facilitator
|
|
|
| Back to top |
|
 |
Jason Piercey
Guest
|
Posted:
Thu Dec 23, 2004 2:58 am Post subject:
Re: browseForFolder return values |
|
|
Wow, lots of info over there on MSDN.
I assume you were referring to this structure
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/structures/browseinfo.asp
FWIW, I changed the third argument from zero to one, and
only folders are permitted. Using Win2K pro.
Thanks for the extra information.
--
Autodesk Discussion Group Facilitator
"Tony Tanzillo" <tony.tanzillo@U_KNOW_WHERE.com> wrote in message
news:41c9e584_3@newsprd01...
| Quote: | The third argument to the BrowseForFolder method of the file system
object, is supposed to allow options that prevent the user from selecting
items that do not represent folders, but on my system (XP SP2) I have
not been able to get them to work.
The BROWSEINFO structure documentation in MSDN enumerates the
flags that you can pass, but the don't appear to work from Visual
LISP, and I don't know why. |
|
|
| Back to top |
|
 |
Jason Piercey
Guest
|
Posted:
Thu Dec 23, 2004 5:42 am Post subject:
Re: browseForFolder return values |
|
|
Trying to get a handle on how some of this stuff works.
Are you saying that items like these
BIF_BROWSEFORCOMPUTER
BIF_BROWSEFORPRINTER
fail to work from activeX entirely, or just with the XP SP2?
If these do work, they are passed as quoted symbols or
do the evaluate to an integer value? I'm not finding the
answer to that while searching through MSDN.
--
Autodesk Discussion Group Facilitator
"Tony Tanzillo" <tony.tanzillo@U_KNOW_WHERE.com> wrote in message news:41c9e584_3@newsprd01...
| Quote: | The BROWSEINFO structure documentation in MSDN enumerates the
flags that you can pass, but the don't appear to work from Visual
LISP, and I don't know why. |
|
|
| Back to top |
|
 |
Luis Esquivel
Guest
|
Posted:
Thu Dec 23, 2004 8:04 am Post subject:
Re: browseForFolder return values |
|
|
Hi Jason,
not an answer but an alternative... there is the browseforfolder and opensave common dialogs at the downloads section of www.drafteam.com including the visual lisp code. |
|
| Back to top |
|
 |
Marc'Antonio Alessi
Guest
|
Posted:
Thu Dec 23, 2004 12:40 pm Post subject:
Re: browseForFolder return values |
|
|
| Quote: | If these do work, they are passed as quoted symbols or
do the evaluate to an integer value? I'm not finding the
answer to that while searching through MSDN.
|
They are Bit values.
; ulFlags - value of iOptns
;
; 1 RestrictToFilesystem = &H1 ' BIF_RETURNONLYFSDIRS
; 2 RestrictToDomain = &H2 ' BIF_DONTGOBELOWDOMAIN
; 8 RestrictToSubfolders = &H8 ' BIF_RETURNFSANCESTORS
; 16 ShowTextBox = &H10 ' BIF_EDITBOX
; 32 ValidateSelection = &H20 ' BIF_VALIDATE
; 64 NewDialogStyle = &H40 ' BIF_NEWDIALOGSTYLE
; 4096 BrowseForComputer = &H1000 ' BIF_BROWSEFORCOMPUTER
; 8192 BrowseForPrinter = &H2000 ' BIF_BROWSEFORPRINTER
; 16384 BrowseForEverything = &H4000 ' BIF_BROWSEINCLUDEFILES
;
;
; Flags specifying the options for the dialog box. This member can include
; zero or a combination of the following values.
;
; BIF_BROWSEFORCOMPUTER
; Only return computers. If the user selects anything other than a computer,
; the OK button is grayed.
<clip>
In this sample I use iOptns = 48 > 16 + 32
; Example: (ALE_BrowseForFolder "Select a folder:" 48 "C:\\Temp\\")
;
; Credits: Tony Tanzillo
;
(defun ALE_BrowseForFolder (PrmStr iOptns DefFld /
ShlObj Folder FldObj OutVal)
(vl-load-com)
(setq
ShlObj (vla-getInterfaceObject
(vlax-get-acad-object) "Shell.Application"
)
Folder (vlax-invoke-method ShlObj
'BrowseForFolder 0 PrmStr iOptns DefFld
)
)
(vlax-release-object ShlObj)
(if Folder
(progn
(setq
FldObj (vlax-get-property Folder 'Self)
OutVal (vlax-get-property FldObj 'Path)
)
(vlax-release-object Folder)
(vlax-release-object FldObj)
OutVal
)
)
)
--
Marc'Antonio Alessi
http://xoomer.virgilio.it/alessi
(strcat "NOT a " (substr (ver) 8 4) " guru.")
-- |
|
| Back to top |
|
 |
Jason Piercey
Guest
|
Posted:
Thu Dec 23, 2004 7:16 pm Post subject:
Re: browseForFolder return values |
|
|
I figured they were bit values, but could see very
little difference between some of them when viewing
the different dialogs trying it bit by bit.
Thanks.
--
Autodesk Discussion Group Facilitator
"Marc'Antonio Alessi" <nospam maalessi at tin dot it> wrote in message
news:41ca761f_1@newsprd01...
| Quote: | If these do work, they are passed as quoted symbols or
do the evaluate to an integer value? I'm not finding the
answer to that while searching through MSDN.
They are Bit values.
; ulFlags - value of iOptns
;
; 1 RestrictToFilesystem = &H1 ' BIF_RETURNONLYFSDIRS
; 2 RestrictToDomain = &H2 ' BIF_DONTGOBELOWDOMAIN
; 8 RestrictToSubfolders = &H8 ' BIF_RETURNFSANCESTORS
; 16 ShowTextBox = &H10 ' BIF_EDITBOX
; 32 ValidateSelection = &H20 ' BIF_VALIDATE
; 64 NewDialogStyle = &H40 ' BIF_NEWDIALOGSTYLE
; 4096 BrowseForComputer = &H1000 ' BIF_BROWSEFORCOMPUTER
; 8192 BrowseForPrinter = &H2000 ' BIF_BROWSEFORPRINTER
; 16384 BrowseForEverything = &H4000 ' BIF_BROWSEINCLUDEFILES
;
;
; Flags specifying the options for the dialog box. This member can include
; zero or a combination of the following values.
;
; BIF_BROWSEFORCOMPUTER
; Only return computers. If the user selects anything other than a
computer,
; the OK button is grayed.
clip |
|
|
| Back to top |
|
 |
Jason Piercey
Guest
|
Posted:
Thu Dec 23, 2004 7:17 pm Post subject:
Re: browseForFolder return values |
|
|
Thanks Luis, I'll check them out when I
have more than a minute.
--
Autodesk Discussion Group Facilitator
"Luis Esquivel" <nospam@address.withheld> wrote in message
news:16293909.1103771115809.JavaMail.jive@jiveforum1.autodesk.com...
| Quote: | Hi Jason,
not an answer but an alternative... there is the browseforfolder and
opensave common dialogs at the downloads section of www.drafteam.com |
including the visual lisp code. |
|
| Back to top |
|
 |
Jason Piercey
Guest
|
Posted:
Thu Dec 23, 2004 8:11 pm Post subject:
Re: browseForFolder return values |
|
|
PS:
negative values also make changes to the dialog.
--
Autodesk Discussion Group Facilitator
"Marc'Antonio Alessi" <nospam maalessi at tin dot it> wrote in message
news:41ca761f_1@newsprd01...
| Quote: | They are Bit values.
; ulFlags - value of iOptns
|
<snip> |
|
| Back to top |
|
 |
|
|
|
|