From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview how to implement method from C%23 interface

Hi,

 

I'm trying to implement onChapter (iTextSharp.text.pdf.PdfPageEventHelper.onChapter) method from iTextSharp library http://www.afterlogic.com/mailbee-net/docs-itextsharp/html/8f1ae11a-18b5-f04b-9481-a2ee86924c36.htm and

I'm note sure how to do that. Is there an example on how to implement method from an C# interface?

0 Kudos
Message 1 of 3
(2,105 Views)

Hi Andrej!

 

To integrate C# .dll functions into your LabVIEW code, you will want to use .NET functions. On that, you can find quite a few examples. The programming flow is usually the same: use constructor node(s) to create the .NET object(s) you need, call properties or methods associated with the object(s), and free resources by closing the references once you're finished. Your function would look something like this:

OnChaper call.png

 

Hope this helps.

 

Regards:

 

Andrew Valko

NI Hungary

Andrew Valko
National Instruments Hungary
0 Kudos
Message 2 of 3
(2,070 Views)

Thanks Andrew! I'm already familiar with the .NET functions and how to use them. I used this several times. Maybe I wasn't clear enough.

My question was whether I can implement PdfPageEventHelper interface (in C# "extends" key word is used for this purpose) and then write my own OnChapter implementation. The purpose of OnChapter method is that is invoked when you add a new chapter. So it is used to do something you want to be done when you add chapter. That's why you must write your own code for OnChapter method.

0 Kudos
Message 3 of 3
(2,019 Views)