Author Topic: OpenFileDialog  (Read 15708 times)

0 Members and 1 Guest are viewing this topic.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: OpenFileDialog
« Reply #15 on: January 29, 2007, 11:55:18 AM »
CAB ...

I tried something here in this VLX .. let me know if it works ...

<REMOVED ATTACHMENT -- SEE LATER POST>
« Last Edit: January 29, 2007, 04:15:04 PM by Keith™ »
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: OpenFileDialog
« Reply #16 on: January 29, 2007, 02:29:09 PM »
I regerestered the ocx & then tried this
Code: [Select]
_$ (setq dialog (vlax-create-object "MSComDlg.CommonDialog"))
nil
_$ (setq dialog (vlax-create-object "MSComDlg.CommonDialog.1"))
nil
_$

I then tried to register the dll & got this
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: OpenFileDialog
« Reply #17 on: January 29, 2007, 02:55:02 PM »
Cab, try the VLX in the previous post to see if it provides the window, if it does, then I have a sneaking suspicion that the error is related to the design time license I have with the CommDlg32.ocx. Since I have the developer edition of VB both here and at home that may be the defining factor. Either way, if the above code works, it "should" grant you rights to use the dialog based on my giving you rights through my license ... i.e. the type library is on your computer, but the license to use it must come from a licensed developer .. in otherwords I can distribute an application that uses the comdlg window, but I can't distribute the type library and by my distribution of this application in the compiled format, it should .. theoretically give you permissions enough to create the window ... I don't know if it extends past the compiled code .. for example any code you might write.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: OpenFileDialog
« Reply #18 on: January 29, 2007, 03:25:00 PM »
Loaded it, used Start CommonDialog, Here is what I get:
« Last Edit: January 29, 2007, 03:26:05 PM by CAB »
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: OpenFileDialog
« Reply #19 on: January 29, 2007, 03:27:49 PM »
WELL DAGNABIT ... The command is (commondialog) .. forgot to mention that ...

It should work ... back to the drawing board ..
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: OpenFileDialog
« Reply #20 on: January 29, 2007, 03:32:47 PM »
Code: [Select]
Command: (commondialog)

Error: too many arguments
:-o
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: OpenFileDialog
« Reply #21 on: January 29, 2007, 03:36:49 PM »
A different error? Now this is really getting intriguing ...
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

Fatty

  • Guest
Re: OpenFileDialog
« Reply #22 on: January 29, 2007, 03:58:52 PM »
Code: [Select]
Command: (commondialog)

Error: too many arguments
:-o
Alan
I've got the similar one:
Code: [Select]
Command: (commondialog (getvar "dwgprefix"))
; error: too many arguments
Command: CommonDialog
Unknown command "COMMONDIALOG".  Press F1 for help
Command: (CommonDialog)
; error: too many arguments

~'J'~

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: OpenFileDialog
« Reply #23 on: January 29, 2007, 04:15:42 PM »
Ok .. try this one then ...

Same scenario ...

(commondialog) to run
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: OpenFileDialog
« Reply #24 on: January 29, 2007, 05:23:26 PM »
 :-(
Code: [Select]
Command: (commondialog)
; error: bad argument type: VLA-OBJECT nil
; reset after error
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: OpenFileDialog
« Reply #25 on: January 29, 2007, 05:59:26 PM »
well ... darn ... I know I am sending the license through ... I have just never had to do it through lisp before ... I need to do a little more research ...
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: OpenFileDialog
« Reply #26 on: January 29, 2007, 06:47:48 PM »
Thnaks for your time Keith.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

ELOQUINTET

  • Guest
Re: OpenFileDialog
« Reply #27 on: January 30, 2007, 08:58:44 AM »
cab i've been watching what's going on in this thread and am wondering is this what you had in mind for the plottabs script we were discussing last week. so the main goal here is to be able to open multiple files from multiple folders? just curious

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: OpenFileDialog
« Reply #28 on: January 30, 2007, 09:34:01 AM »
Yes, but a useful tool for other lisp as well.
Here is the alternative routine.
Code: [Select]
;;  Get user pick of files, one at a time
(defun c:test (/ file files)
 
  (if (setq file (getfiled "Select a file to include in Batch" "" "dwg" 128))
    (while
      (setq files (cons file files)
            file  (getfiled "Select another file or Cancel to quit" file "dwg" 128)
      )
    )
    (princ "\nNo files were selected.")
  )
 
  (and files (princ files))
  (princ)
)
« Last Edit: January 30, 2007, 09:45:17 AM by CAB »
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

hendie

  • Guest
Re: OpenFileDialog
« Reply #29 on: January 30, 2007, 10:53:33 AM »
CAB you could smudge it by using the Browse for folders in your first post...
use the browse for folder to *ahem* browse for folders, then add a listbox to the form that displays all the files in the selected folder, and use that listbox to let the user select multiple files.

fwiw, I have the three controls on my system but still cannot use the commondialog and even stranger, I can bring in a routine from home utilising the common dialog and it works fine, but I cannot copy it across modules.