wblock brings up the dialog box that asks you to select objects, pick insertion point, name the file, etc.
-wblock brings up the saveas dialog then proceeds with command line version of the command
-wblock with FILEDIA set to 0 uses the command line to define the file name then proceeds with command line version of the command
however, when I try to use LISP to force the 'w' key to be the dialog named command line version of the command, it will not play nice, it only proceeds with the command line version of the command. This is what I'm trying (it acts the same with or without the (setvar "filedia" 1)
(defun c:w () (setvar "filedia" 1)(command "-wblock"))
I'm running this at the very end of startup so that these 'keyins' take precedence over anything OOTB
Just to be clear, I want type W <enter/space> and get the dialog named command line version of the WBLOCK command (2nd in the list above)
Solved! Go to Solution.
it was set to 1, but I also tried 0, this variable seems to have no effect on the command
Generally calling standard autocad command from (command) / (vl-cmdf) functions
(or script file) will invokes it's command line behaviour (no dialog box).
to achieve what you want? you need to call (initdia) function just before.
althought the online-help does not specially mentions that WBLOCK is supported - it works!
(initdia) effects only the next call (and next call only) of a command that comes with dialog box.
You were right on. Except I wanted (command "-wblock) not (command ".wblock") but the initdia part is what got me there. Cheers!
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register