AnsweredAssumed Answered

AfterAddComponent Event is not called!

Question asked by juergen.hinterleitner on Jul 12, 2018
Latest reply on Jul 25, 2018 by Patrick.Cashman


What do I wrong? ... I load a Designer Script in scripts.ini.

In advance: The script itself works well. Scripting.DontExit is also set to True. And the Event "AfterDocumentOpened" is called every time after open.


But the Event: "Application_AfterAddComponent" will not be called! when I place(d) components with the Databook.
whether I place it unique or generic, as it is described in the "Xpedition Designer Automation Reference" Documentation.


whether I define the script event as a Sub or as a Function.

whether I define it as Application_AfterAddComponent or as MyApp_AfterAddComponent after I coded: "Scripting.AttachEvents Application, "MyApp"".


Remember: this works in the same script:

Sub Application_AfterDocumentOpened(ByVal iDocumentType, ByVal LibraryAlias, ByVal sName)

     MsgBox "test",,"after open"

End Sub

And this does not work:

Sub Application_AfterAddComponent (ByVal component)

     MsgBox "this message I never see!",,"hmpf"

End Sub


Any Ideas?