What am I am I doing wrong?
I have spent all day trying to undrstand this, the help menu does not give me an example and the forums are too complicated for me to understand.
How would I create the most basic of simplist 'command-reactor'?
Here is my mangled code:
(vl-load-com)
(vlr-command-reactor
"Load Plot Setup from Template" '((:vlr-commandWillStart . PlotSetup))
)
(setq
acadObject (vlax-get-acad-object)
acadActiveDocument (vla-get-ActiveDocument acadObject)
acadPlotConfigurations (vla-get-PlotConfigurations acadActiveDocument)
)
;-----------------------------------------------------------------------------------------
(vla-StartUndoMark acadActiveDocument) ;Start of UNDO
;-----------------------------------------------------------------------------------------
;-----------------------------------------------------------------------------------------
(defun PlotSetup ( / )
(setq cmd (strcase "PLOT"))
(cond
((wcmatch cmd "PLOT"))
(vlax-for eachPlotConfig acadPlotConfigurations
(if
(wcmatch (vla-get-name eachPlotConfig) "Oce_TDS600 ANSI D 22x34,Oce_TDS600 Arch D 24x36,Oce_TDS600 Arch E1 30x42,PDF_995 ANSI A 8.5x11,PDF_995 ANSI B 11x17,PDF_995 ANSI D 22x34,PDF_995 Arch D 24x36,PDF_995 Arch E1 30x42")
(vla-delete eachPlotConfig)
)
)
(command "-psetupin" "FilePath")
)
;-----------------------------------------------------------------------------------------
(vla-EndUndoMark acadActiveDocument) ;End of UNDO
;-----------------------------------------------------------------------------------------
(princ)
)
Thanks for any assistance