LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Nicelabel activeX problems

I am trying to create a interface to nicelabel (www.nicelabel.com), I downloaded a 'nicelabel PRO' demo and installed it. I used CVI6.0 to create a activeX wrapper around the activeX component, but when i tryn to use it, it resolves in a E_NOINTERFACE. How can this be, since CVI created the wrapper by using the activeX component itself. The activeX component is usable through VB6.0.
0 Kudos
Message 1 of 11
(7,926 Views)
I have tried to figure out why this happens but it is not very clear. I downloaded the Nicelabel Pro demo, and installed it. Then I ran the ActiveX Controller wizard, and saw that Nicelab installs a lot of activex interfaces. I tried 'Nicelabel Settingslibrary' and 'Nicelib'. I was able to call the nicelib_NewIRecordForm (NULL, 1, LOCALE_NEUTRAL, 0, &niceobjecth) and NICELabel3_NewISettings (NULL, 1, LOCALE_NEUTRAL, 0, &nicelabelh); without getting error messages. I noticed that there are more ActiveX controllers installed with nicelabel (i.e. nscriptlib, nclipart, and others). Which one are you calling, and can you maybe post 20 lines of code describing the problem? Also this may be important: I tried it in CVI 7.0.

Best regards,
ErikvH
Applications Engineering

National Instruments Netherlands
0 Kudos
Message 2 of 11
(7,926 Views)
Erik,
I am trying to call the NiceLabel interface, which is the basic interface for nicelabel printing. Ill attach the created activeX wrapper and application. Possibly the files are from a different test and will not compile together, but they will give an Idea of what I am trying to do.

If you install the Sato cl408e printer driver as well, you should see documents appear in the printer queue on a successfull attempt.

Best regards,

Sjoerd
Download All
0 Kudos
Message 3 of 11
(7,926 Views)
Hello Sjoerd,
My computer does not list "nicelabel" under activex controller wizard. I have "nicelabel settings library", "nicelib library", "ninspect library", "njobexplorerlib library", "nscriptlib library" (4 times), and "nclipart library", "ncprov 1.0 type library".
I also do not have this Sato printer.
I was not able to compile your code. Please provide me with more detailed instructions.

Best regards,

ErikvH
Applications Engineering
National Instruments
0 Kudos
Message 4 of 11
(7,926 Views)
OK, run 'nice3.exe /regserver' and 'nice3.exe /typelib' in c:\programfiles\nicelabel\bin
in CVI 'create activeX controller': click 'browse'
select c:\programfiles\nicelabel\bin\nice3.olb this will show the activeX component

You don't need a actual printer, just istall the printer drivers ( I will attach them ) possibly you will need to configure the printer as default.

Regards,

Sjoerd
0 Kudos
Message 5 of 11
(7,926 Views)
Hi Sjoerd,
I was able to install and run the correct ActiveX component with this information. I have tried to use the NewNiceApp method, which gives me error 2147467262 (No such interface supported), as well as a couple of other ones, when I keep trying. It seems to me that the root cause is the COM server. I have not tried yet, but some error messages point that the ActiveX server wants to use some functions which are not supported in the OLE32 or COMCAT dll's. I know there are a couple of instances where the 4K release 5 version of the comcat creates errors, which were not in version 4.71 (22k size), also take a look at Microsoft support, you will see a couple of entries on those dll's, relating to simular errors. Two interesting
knowledgebases are: http://support.microsoft.com/default.aspx?scid=kb;en-us;201364 and http://support.microsoft.com/default.aspx?scid=kb;EN-US;q183370.
Also I found that in past cases, installing Internet Explorer 6 helped (although I already have that here as well). I recommend you also contact Nicelabel to see if the have seen similar cases.
If that doesn't work, please contact our local technical support, via phone or e-mail, so we can try to fix this off-line.

Best regards,
ErikvH
Applications Engineering
National Instruments
0 Kudos
Message 6 of 11
(7,926 Views)
I don't think the comcat.dll is the problem since the little VB appl works just fine:
Dim labelId As Long

Private Sub Command1_Click()
Set niceApp = CreateObject("NiceLabel.Application")
labelId = niceApp.LabelOpen("c:\AMpass.lbl")
Success = niceApp.LabelSetVar(labelId, "Serial", "123456", 0, 0)
Success = niceApp.LabelSetVar(labelId, "Date", "N123", 0, 0)
Success = niceApp.LabelPrint(labelId, 1)
Success = niceApp.LabelClose(labelId)
niceApp.Quit

Set niceApp = Nothing
End Sub

I already had contact with nicelabel but they do not have a clue on why this error is occuring with CVI. They do not have customers using CVI in combination with NiceLabel.

Best regards,

Sjoerd
0 Kudos
Message 7 of 11
(7,926 Views)
I just tried changing the comcat.dll, but it didn't help. I will need to do some more investigations before I can give you a final solution. Please be patient while we investigate this.

Best regards,

ErikvH
Applications Engineering
National Instruments
0 Kudos
Message 8 of 11
(7,926 Views)
While doing some more VB tests, I noticed that the NiceLabel activeX interface seems to be not fully compliant to the COM standard ( for example the QUIT method of the application interface ) I observed this using the microsoft object browser( see attachment). After some more VB tests, i worked around the problem by writing a wrapper COM server vor the Nicelabel activeX interface.
0 Kudos
Message 9 of 11
(7,926 Views)
We did some tests here as well, but we have not been able to find the underlying cause. I think indeed the best way is to write a wrapper DLL, either in VB or LabVIEW, and call that from CVI. Maybe you can inform the vendor of NiceLabel of this issue, so they may check their ActiveX interface.

ErikvH
Applications Engineering
National Instruments
0 Kudos
Message 10 of 11
(7,926 Views)