Example of Creating Template Files with FileMaker™ (Visual Basic Script)
Create a Template File (Label Layout File)
-
1.
Enter the following using a text editor and save it with a file name "Fixed asset.vbs".
'Create b-PAC object Set ObjDoc = CreateObject("bpac.Document") 'Open template file created with P-touch Editor 'Leave LBX file in the same folder as VBS file bRet = ObjDoc.Open(".¥Fixed asset.lbx") If (bRet <> False) Then 'normally open? 'Set value to text object of "Fixed asset name" ObjDoc.GetObject("Name").Text = WScript.Arguments.Item(0) 'Set value to text object of "Management section" ObjDoc.GetObject("Section").Text = WScript.Arguments.Item(1) 'Set value to text object of "Identification No." ObjDoc.GetObject("Number").Text = WScript.Arguments.Item(2) 'Set value to barcode object ObjDoc.GetObject("QRCode1").Text = WScript.Arguments.Item(2) 'Execute printing ObjDoc.StartPrint "DocumentName", bpoAutoCut ObjDoc.PrintOut 1, bpoAutoCut ObjDoc.EndPrint ObjDoc.Close End If 'Release b-PAC object Set ObjDoc = Nothing
Notes
- You can also change an image object and configure the font settings.
- For methods available from b-PAC, refer to the b-PAC SDK documentation.
- 2. Using FileMaker™ Pro, create the database in the same folder as "Fixed asset.vbs" above.
- 3. In Script > ScriptMaker..., display a Script Management dialog box and click the Create button.
- 4. In the Edit Script dialog box, enter "Print" in Script name, select Transmit event and click the Move button.
- 5. In the Edit Script dialog box, click the Designated... button to display the Transmit Event Options dialog box, and click Calculate.
-
6.
Enter the following and click the OK button.
"Fixed asset.vbs" & " ¥"" & Fixed asset::Fixed asset name & "¥" ¥"" & Fixed asset::Management section & "¥" ¥"" & Fixed asset::Identification No. & "¥""
Precaution
Make sure to enter single-byte spaces above. The single-byte spaces above appear as follows with underlines. (Enter a single-byte space to the underlined parts.)
"Fixed asset.vbs"_&_"_¥""_&_Fixed asset::Fixed asset name_&_"¥"_¥""_&_Fixed asset::Management Div_&_"¥"_¥""_&_Fixed asset::Management No_&_"¥"" - 7. Close the Transmit Event Options dialog box by clicking the OK button.
- 8. Click the [x] button in the Edit Script dialog box, then click the Save button.
- 9. Close the Script Management dialog box by clicking the [x] button.
- 10. Select a record to print and execute Script > Print to print the label.
Download
FAQ
For Developers
-
Choose from Purposes
Label printing, printer setup and management information.
-
b-PAC
Information on application development tools for Windows
-
Mobile SDK
Information on application development tools for mobile terminals
-
Command Reference
Information on control command reference for label printers and mobile printers
-
Versatile software
Information on versatile software provided by Brother
-
Choose from Models
Introduction of Brother tools applicable to your model
-
Video Library
Videos showing how to use SDK and other information
-
Contact Us
Fill out the contact us form if you have questions about Brother developer tool.