The reactor was my first guess but I wouldnt know where to look to get started.
(or (vl-some (function (lambda (r) (= (vlr-data r) "LayoutCheck")))
(cdar (vlr-reactors :VLR-AcDb-Reactor))
)
(vlr-acdb-reactor "LayoutCheck" (list (cons :vlr-objectModified 'LayoutCheck)))
)
(defun LayoutCheck (reactor_object obj / ent)
(setq ent (entget (cadr obj)))
(if (= (cdr (assoc 0 ent)) "LAYOUT")
(if (/= (cdr (assoc 0 ent)) "dwg to pdf.pc3")
(alert "You will be punnished!")
)
)
)
This would be the way to go I think. A reactor that would give a message that the Plot Device was changed wich is not allowed.
But I have tried this routine and it keeps alerting, whens saving the drawing, when switching layouts etc.
The plot device's name is correct on all layouts but still it alerts.
Maybe it needs more thinking, only alert if the plot device's name was changed from "DWG To PDF.pc5" to anything else.
But I have no clue. If you could help it would be cool.
If not, then is't is okay as well, I am glad with the help so far.