Verification.Object Property |
Returns the names of the objects in the document that are causing the message. Read-only.
Verification.Object
Version |
BarTender 7.50 or higher |
Edition |
Automation, Enterprise Automation |
'Declare a BarTender application variable
Dim btApp As BarTender.Application
'Declare a BarTender document variable
Dim btFormat As BarTender.Format
'Declare a BarTender printer code template variable
Dim btPCT As BarTender.PrinterCodeTemplate
'Declare a BarTender verification variable
Dim btVerification As BarTender.Verification
'Declare a BarTender messages variable to hold all messages
Dim btMessages As BarTender.Messages = Nothing
'Create a new instance of BarTender
btApp = New BarTender.Application
'Set the BarTender application visible
btApp.Visible = True
'Open a BarTender document
btFormat = btApp.Formats.Open("c:\Format1.btw", False, "")
'Set the printer code template variable
btPCT = btFormat.PrinterCodeTemplate
'Export the printer code template
btPCT.Export("SAPscript-ITF", BarTender.BtPctExportType.btPctExportSeparate, "c:\Printer Code Templates\FormatTemplate.prn", "c:\Printer Code Templates\DataTemplate.prn", btMessages)
'Check to see if there is an error message
If btMessages.Count > 0 Then
'Get the error message
btVerification = btMessages.GetMessage(1).Verification
'Display the first object that has a problem
MessageBox.Show(btVerification.Object)
End If
'End the BarTender process
btApp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges)
// Declare a BarTender application variable
BarTender.Application btApp;
// Declare a BarTender document variable
BarTender.Format btFormat;
// Declare a BarTender printer code template variable
BarTender.PrinterCodeTemplate btPCT;
// Declare a BarTender verification variable
BarTender.Verification btVerification;
// Declare a BarTender messages variable to hold all messages
BarTender.Messages btMessages;
// Declare an object variable
System.Object obj = null;
// Create a new instance of BarTender
btApp = new BarTender.Application();
// Set the BarTender application visible
btApp.Visible = true;
// Open a BarTender document
btFormat = btApp.Formats.Open("c:\\Format1.btw", false, "");
// Set the printer code template variable
btPCT = btFormat.PrinterCodeTemplate;
// Export the printer code template
btPCT.Export("SAPscript-ITF", BarTender.BtPctExportType.btPctExportSeparate, "c:\\Printer Code Templates\\FormatTemplate.prn", "c:\\Printer Code Templates\\DataTemplate.prn", ref obj);
// Set the messages variable to the object
btMessages = obj as BarTender.Messages;
// Check to see if there is an error message
if (btMessages.Count > 0)
{
// Get the error message
btVerification = btMessages.GetMessage(1).Verification;
// Display the first object that has a problem
MessageBox.Show(btVerification.Object);
}
// End the BarTender process
btApp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges);