For this sample to work you will have to add reference to “niceengine5wr.dll” that is usually installed in the “c:\Program Files\Common Files\EuroPlus Shared\NiceEngine 5” folder.
Nicelabel sdk code#
The following piece of code shows how you can programmatically get a list of variables from a label (.lbl) file. It is always wise to make a backup of label files first just in case something goes wrong. You have to have files in both places (the old and new path) in order for this to work, because paths are checked when label is opened and saved. Select the “Set paths…” option from the “Tools” menu to open a new window:Īll you have to do is to enter the old path to the files, new path to files and select all the labels you would like to change. But now you can change them with a few clicks. Usually this would mean opening all label files, changing paths to graphics and saving them. This feature can come handy when you have lots of label files with graphics and want to change a location of those file. Support for changing paths to graphics files was added.This is sort of a hidden feature, because you have to press CTRL + T, when “Label Info” page is selected. Information about the time that is needed to load a label file can be shown.Global variables are now shown in a list of variables.Information about number of objects, variables, functions and databases is now available.New version of Label Structure is now available from NiceLabel ftp server. PreviewStatus = label.GetLabelPreviewEx(previewFileName, width, height, 1, 0, false) NiceEngine5WR.NiceLabel label = engine.LabelOpenEx(“file.lbl”) NiceEngine5WR.NiceApp engine = new NiceEngine5WR.NiceApp() Then you can load the image file in a component of your choice. The following code will run NiceEngine, open label and get a preview of the label in a file called “preview.jpg” that is located in “c:\tmp”. flag that defines whether to show border around preview or not (true or false)įunction will return true if graphics file was successfully created or false it file could not be created.īool GetLabelPreviewEx(fileName, width, height, labelKind, labelSide, showBorder).Using back side of the label makes sense only if you have label designed as double sided. label side: define whether you want to preview front side (use 0 as parameter value) or back side of the label (use 1 as value).label kind: there are 3 possible values that define the kind of label you want preview for 0 – header label, main label, tail label.Extension part of the file name defines which graphics format will be used.