vlax-add-cmd
(vlax-add-cmd globalName lspFunction [
localisedName [ cmdFlags ] ] )
This function declares lspFunction as a native
command globalName for BricsCAD.
Arguments
|
globalName
(string) the global command
name
lspFunction (symbol) a Lisp DEFUN function
localisedName (string, optional) the localised command
name
cmdFlags (integer, bit flags, optional) command
behaviour flags; if omitted, value acrx_cmd_redraw (4) is
used;
these flags can be combined (by OR)
:
acrx_cmd_modal
|
0
|
|
acrx_cmd_transparent
|
1
|
|
acrx_cmd_usepickset
|
2
|
|
acrx_cmd_redraw
|
4
|
|
acrx_cmd_noperspective
|
8
|
|
acrx_cmd_notilemode
|
32
|
|
acrx_cmd_nopaperspace
|
64
|
|
acrx_cmd_nooem
|
256
|
|
acrx_cmd_nohistory
|
8388608
|
|
acrx_cmd_no_undo_marker
|
16777216
|
|
acrx_cmd_nobedit
|
33554432
|
|
|
Return
|
string; returns
globalName or NIL
in case of an error
|
Example
|
(defun HellowWorld () (alert
"Hello World")(princ)) HELLOWORLD
(vlax-add-cmd "HelloWorld" 'HelloWorld (+
acrx_cmd_transparent acrx_cmd_nopaperspace))
"HelloWorld"
command HelloWorld will only run (even as
transparent command) in ModelSpace, for PaperSpace the command is
blocked
|
Remarks
|
see (vlax-remove-cmd) function
|