07-07-2005 08:16 AM
Dim Lbl As Object
Set = CreateObject ("Lblvw.Document")
‘Load label in ReadOnly mode
Lbl.Open("C:\Lvwin70\Shift Act.lbl", True)
‘Get printer information
Dim Prt As Object
Dim PrtName As String, PrtPort As String
Set Prt = Lbl.LabelPrinter
PrtName = Prt.Name
PrtPort = Prt.Port
‘Get field information
Dim Flds As Object ‘Collection
Dim Fld As Object
Dim Count As Integer
Dim FldName As String
Set Flds = Lbl.LabelFields
Count = Flds.Count
For I = 1 To Count
Set Fld = Flds(I)
FldName = Fld.Name
Fld.Value = "abcdef"
Set Fld = Nothing
Next
‘Print 2 Labels…
Lbl.PrintLabel 2
‘Clean Up
Set Prt = Nothing
Set Lbl = Nothing
07-07-2005 08:24 AM
07-07-2005 08:40 AM
07-07-2005 09:02 AM
07-08-2005 11:09 AM
As Altenbach pointed out, Labelview has nothing to do with LabVIEW. However I did a little search on google and found this link. May be you will find it useful.
http://www.teklynx.com/products//labels/labelview_faq.html
Ankita
NI
07-08-2005 04:11 PM
My sincere apologies....I overlooked Toro's last post on this thread and misinterpreted Altenbach's comment. It's Friday...what can I say.
Back to Toro's question now : Please elaborate on how you are using LabVIEW to test your product. Since you mentioned that sometimes when a new product is going through the line, the user forgets to change the product label; do you want LabVIEW to identify which product is running through the line and then assign appropriate label to it? If so, what differentiates a new product from the old one. Is it their geometrical shape (our IMAQ and vision software can help with that) ? Or are you wondering how to communicate between LabelVIEW and LabVIEW. Please elaborate more on the problem you are facing and I will do my best to help.
Regards,
Ankita
NI
07-08-2005 05:46 PM
If you have a program in Basic that does what you want, you need to convert it to ActiveX calls. This can only be done by someone that has the LabelView program installed, otherwise the activex methods and properties cannot be selected.
You will need to start with an Automation Refum on the front panel. Right click on it and Select the ActiveX class of the Label_Application.
Now go to the diagram and add an Open Automation, then an Method node to Open the label template. You can then add Property nodes to get the document.LabelFields.Count.
Now the hard part. LabelFields is a collection. Place a Method node set to Item inside the for loop. This returns a variant that goes into the Variant to Data with a constant set to LabelField. From there just drop a Property node and set the Value of each field.
Add the required clean up by closing the label document, quit the label application and close every reference that was created.
07-22-2005 01:06 PM
07-22-2005 03:43 PM
07-22-2005 05:36 PM
The current version of LabelView does not sopport ActiveX. LabelView Gold version does sopport OLE Automation a feature that does allow the program to be control form another application.
I use LabView ActiveX and Invoke Node to open the label using its name, select the printer, select the quantaty to print, close the application. See the instruction from Michael Munroe it help a lot.
I have use LabelView for some years now. You can load the data base with all the part numbers of products and the information you want to print on the label (of course you need to set-up the label with the text or barcodes linked to the database) then using LabelView Print enter the part number you want to print then LabelView pull the data that needs to be printed on the label.
I think we can do the same using LabView to select the part number to print the label. I have not try it yeat. The soonest I finish the current project I will start on this new project.