It's me and my screenmenu again.
This time I stumbled upon a problem with the OnDocActivated Event of the non-modal dialog.
Whenever I open a new DWG-file while my screenmenu is active (I leave it visible all the time) The first message in the textscreen is
; Fehler: no function definition: C:SCREENMENU_SCREENMENU2_ONDOCACTIVATED
I'd guess this is cause because the screenmenu calls the event before AutoCAD has loaded the acad.lsp.
Is there a way to prevent this behavior?
Like postponing the event until Lisp has finished loading or something like that.
Kind regards
Ingo P
Which version of AutoCAD?
Sorry
I forgot to mention it.
This behavior occurs in:
- AutoCAD 2013 (German)
- AutoCAD 2014 (German)
BricsCAD seems to be fine on this matter. (At least 13.2.9, which is the latest, I am currently running)
I'll try to find some time this weekend to review my code and then I will upload the menu to this board for all to use.
After thinking about this, I vaguely recall that it was expected behavior that the OnDocActivated handler would only be called when existing documents are reactivated (hence acaddoc.lsp would need to handle the case of a newly created document). It gets a little tricky to ensure that the handler is not executed before acaddoc.lsp is finished loading, but I will investigate to see if the situation can be improved. At the very least it should be consistent between AutoCAD, Bricscad, and ZWCAD.