Retrieve file name from a File Explorer box

Started by macuma, February 15, 2010, 08:26:26 AM

Previous topic - Next topic

macuma

I have a text button on Form 2 which successfully opens a File Explorer dialog box Form 3.

On selecting a file or creating a new file how do I set the variable dat_loc to the file name? It is currently returning nil.

Does clicking Open on the dialog box carry out a close function?

(defun c:dat_Form2_TextButton3_OnClicked (/)
  (dcl_Form_Show dat_Form3)
);defun


(defun c:dat_Form3_OnClose (/)
  (setq dat_loc (dcl_FileExplorer_GetFileName dat_Form3))
);defun

owenwengerd

Owen Wengerd (Outside The Box) / ManuSoft

macuma

Thank you for the quick response, but that did not work.

owenwengerd

Owen Wengerd (Outside The Box) / ManuSoft

macuma

dat_loc is still set to nil even though file selected.

owenwengerd

Can you provide a simple test project that demonstrates the problem?
Owen Wengerd (Outside The Box) / ManuSoft


owenwengerd

I've attached a corrected .lsp file that is working fine for me.  Hopefully this will get you going again.
Owen Wengerd (Outside The Box) / ManuSoft

macuma

Excellent! That did the trick.

Thanks for your help.