Activation Events in Powerforms from SDK (vb/c#.net)

Label printing integration (NiceWatch middleware and ActiveX programming interface)

Moderators: Georges, milos, NiceLabel Support Team

Post Reply
Tonny
Newcomer
Posts: 3
Joined: Fri Sep 11, 2020 11:33 am

Activation Events in Powerforms from SDK (vb/c#.net)

Post by Tonny » Fri Sep 11, 2020 11:55 am

Hi

I have a Powerforms with a button on. When pressing this button it performs a print. Simpe enough.
However I need to activate this button from SDK (vb/C#.NET).
How can I do that?
A short sample would be nice :)

Best regards

User avatar
Kyleodonnell
NiceLabel Support
NiceLabel Support
Posts: 613
Joined: Mon Aug 28, 2017 3:07 pm

Re: Activation Events in Powerforms from SDK (vb/c#.net)

Post by Kyleodonnell » Fri Sep 11, 2020 2:40 pm

Tonny,

Generally when using the SDK, you would call the print engine to print the label. The SDK cannot interact with Powerforms is a different formatted file. What is the use case of needing to do this?

Tonny
Newcomer
Posts: 3
Joined: Fri Sep 11, 2020 11:33 am

Re: Activation Events in Powerforms from SDK (vb/c#.net)

Post by Tonny » Wed Sep 16, 2020 9:05 am

Within Nicelabel Print we have developed a powerform, with some simple buttons.
I wish to push these buttons remotely.
To activate the event/button I have a digital input.
Based on the digital input I want to push the button. In this way we are not dependent on an operator to push the button.

Is that doable?

BR
Tonny

User avatar
Kyleodonnell
NiceLabel Support
NiceLabel Support
Posts: 613
Joined: Mon Aug 28, 2017 3:07 pm

Re: Activation Events in Powerforms from SDK (vb/c#.net)

Post by Kyleodonnell » Wed Sep 16, 2020 4:53 pm

Tonny,

It would not be possible to do this with the SDK, as you use labels with the SDK an develop your own front end as you would call the print engine to print the labels. if you want to do some automatic printing, we suggest you look at using automation, which is a middleware software.

Tonny
Newcomer
Posts: 3
Joined: Fri Sep 11, 2020 11:33 am

Re: Activation Events in Powerforms from SDK (vb/c#.net)

Post by Tonny » Wed Sep 16, 2020 7:23 pm

OK, I am going for a different approach.

I will get the powerforms to look for a file.
I have selected 'Read data from File' as a trigger to start the printing sequence.
However, I need to know whether a file has been successfully read before I execute the rest the actions otherwise it shoud not execute the rest of the actions.
I have tried to put in a 'Condition' under 'Execution options:' but I have not yet figurer out how to use this condition elsewhere.

In psydocode it would look something like this:
If ReadFile = OK then
Perform actions
else
Skip actions
endif

You guessed it :D I am very new to NiceLabel.

Br

User avatar
Kyleodonnell
NiceLabel Support
NiceLabel Support
Posts: 613
Joined: Mon Aug 28, 2017 3:07 pm

Re: Activation Events in Powerforms from SDK (vb/c#.net)

Post by Kyleodonnell » Wed Sep 16, 2020 10:32 pm

Tonny,

you would use something of [Variable] ="True" for VB and [Variable.value]== 'True' for python. However, the read from File action simply just brings data and assigns it to a variable. We highly recommend going with the automation route as it can read files and print them automatically.

User avatar
Kyleodonnell
NiceLabel Support
NiceLabel Support
Posts: 613
Joined: Mon Aug 28, 2017 3:07 pm

Re: Activation Events in Powerforms from SDK (vb/c#.net)

Post by Kyleodonnell » Thu Sep 17, 2020 2:59 pm

Tonny,

Are you using a trial of the software or do you have a license, you can look at SDK samples here but the SDK is meant to replace power forms C:\Users\Public\Documents\NiceLabel 2019\SDK\Samples

once again, it is HIGHLY recommended you use automation as you would need to develop a full front end in the SDK

Please look at this automation sample
C:\Users\Public\Documents\NiceLabel 2019\Automation\Samples\CSV Simple

Post Reply