catch Print event with the add-on
it-Manara
Hi All,
with coresuite customize sample rule: "BUP:0015": we can catch the print event , but how we can catch this event with the sip add-on
I tried with the event LayoutHelper.LD.ProcessArchive, but it can't catch the print event
anybody help me
Paolo Manfrin
Hi,
in your code add a reference to the dll SWA_LD_LayoutHelper.
The event handler can be initialized as:
LayoutHelper.ReportEvent.Definitions.ReportEventHandler.ReportEvent += new LayoutHelper.ReportEvent.Definitions.ReportEventHandler.ReportEvent_Handler(ReportEventHandler_ReportEvent);
void ReportEventHandler_ReportEvent(LayoutHelper.ReportEvent.ReportEvent r)
{
if (r.LayoutDef != null) // SequenceRow -> LayoutDef // SequenceDefinition -> PrintDef
{
// it is a layout def event
// ... add your code here
}
else if (r.LayoutDef == null && r.PrintDef != null)
{
// it is a print def event
// ... add your code here
}
}
hth
paolo
it-Manara
Hi Paolo again :)
I use with debug VS 2010 , and the coresuite add-on is running in SBO and I put your code, but the event didn't catch
Paolo Manfrin
Hi,
you cannot debug designer events with Visual Studio because the designer process runs in a different contest than customize.
The only option is to write your code and import the .sip to test it from within B1.
When inside B1 both customize and designer runs in the same contest and can call each other
hth
paolo
it-Manara
thanks Paolo very much
it is working
Please sign in to leave a comment.
Comments
0 comments