Author Topic: MS common dialog box in lisp(win8 AutoCAD2012 doesn't work)  (Read 1596 times)

0 Members and 1 Guest are viewing this topic.

cjw

  • Guest
MS common dialog box in lisp(win8 AutoCAD2012 doesn't work)
« on: January 04, 2015, 08:46:42 AM »
MS common dialog box in lisp
http://www.theswamp.org/index.php?topic=8405.0

Quote
(setq mscd (vlax-create-object "MSComDlg.CommonDialog")) ;create the object
(vlax-put-property mscd "Filename" "*.*") ;set the file filters
(vlax-put-property mscd "MaxFileSize" 10000) ;set the maximum size of the filename
(vlax-put-property mscd "Flags" 524800) ;set the dialog flags (you can find these in the API reference)
(vlax-put-property mscd "Action" 1) ;set the action of the dialog ... i.e. invoke it as "Open File"
(setq strFileName (vlax-get-property mscd "Filename"))

win8
AutoCAD 2008 work
_$ (setq mscd (vlax-create-object "MSComDlg.CommonDialog"))
#<VLA-OBJECT ICommonDialog 098a45d8>

AutoCAD 2012 doesn't work
_$ (setq mscd (vlax-create-object "MSComDlg.CommonDialog"))
nil

Any idea is appreciated. Thanks.
« Last Edit: January 05, 2015, 08:45:28 PM by cjw »