XVL BOM Assembler Tutorial For Version 1.2 and later LATTICE TECHNOLOGY, INC. Introduction and Objectives The XVL BOM Assembler is a command-line application that converts XVL models into XML structure files and XML structure files into XVL models. By the end of this tutorial, you will be able to perform the following command-line operations: – – – – Generate assembly structure XML file. Generate XVL assembly model out of XML file and part files. Export mass properties in XML. Export a log file. January 2012 Lattice Technology, Inc. 2 Agenda • • • • • • • • Required Files Installing the Visual C++ Runtime Component Command Syntax Generating Assembly Structure XML Files Generating XVL Assembly Models Exporting XML with Mass Properties Exporting Log Files XML Format January 2012 Lattice Technology, Inc. 3 Required Files • In order to execute XVL BOM Assembler, you need the following files*: – – – – xvlbomassembler.exe xvlbom_schema.xsd xerces-c_1_3x8.dll xerces-c_2_8.dll Command line application XML schema check file Xerces-C++ DLL for reading and writing XVL files Xerces-C++ DLL for reading and writing XML files * These files are located in: \Lt_BomAssembler\Bin\ January 2012 Lattice Technology, Inc. 4 Installing the Visual C++ Runtime Component • To use XVL BOM Assembler, Visual C++ runtime component must be installed. • To install Visual C++ runtime component, simply double-click the vcredist_x86.exe* file. * vcredist_x86.exe is located in: \Lt_BomAssembler\ January 2012 Lattice Technology, Inc. 5 Command Syntax Basic Format: xvlbomassembler.exe < -i input_file > < -o output_file > [-p mode] [-m] [-t type num tol] [-r] * Parameters in braces ([ ]) are optional. Parameter -i input_file -o output_file -p mode -m Description Input file. Output file. Specify whether or not to include process information. “mode" can be either of the following values: 0 : Ignore process information and only use assembly information. 1 : Use both assembly and process information. 2 : Use process information only. Specify this option when output file is to include mass properties. -t type num tol Specifies the tessellation parameters to be used in the mass properties calculation. (This option is meaningful only when [–m] option is specified.) -r Specify this option to output a log file in the same folder as the output file. January 2012 Lattice Technology, Inc. 6 Generating XVL Assembly Models • Specify an XML file as input and an XVL file as output to generate an XVL model from an XML file. Example: xvlbomassembler.exe -i sample.xml -o sample.xv2 XML Assembly structural tree + Generate XVL assembly model XVL part files January 2012 Lattice Technology, Inc. 7 Generating Assembly Structure XML Files • Specify an XVL file as input and an XML file as output to generate and assembly structure XML file for the XVL file. Example: xvlbomassembler.exe -i sample.xv2 -o sample.xml XML Assembly structural tree + Generate XVL assembly model XVL part files January 2012 Lattice Technology, Inc. 8 Import Process Information • XVL file is created with process tree information. Example: xvlbomassembler.exe -i sample.xml -o sample.xv2 –p 1 XML Process Tree - Assembly structural tree - Process tree + Generate XVL part files XVL assembly model * Requires Process option. January 2012 Lattice Technology, Inc. 9 Export Process Information in XML • XVL file is created with process tree information. Example: xvlbomassembler.exe -i sample.xml -o sample.xv2 –p 1 Process Tree XML - Assembly structural tree - Process tree + Generate XVL assembly model XVL part files * Requires Process option. January 2012 Lattice Technology, Inc. 10 Exporting XML with Mass Properties 1/2 • Use the –m option to add mass properties to the XML file. Example: xvlbomassembler.exe -i sample.xv2 -o sample.xml -m XML Assembly structural tree + Mass properties Generate XVL assembly model Example of mass properties (in XML): <component name="STT36 Engine" entityId="_6" surfaceArea="38166.293" volume="87484.987" weight="87484.987" massCenter="0.730 -16.240 -1.147" moment_x="86508113.135" moment_y="43024018.796" moment_z="57047574.638" url="STT36 Engine(4).xv2"> <matrix origin="0.798286 -24.5931 19.184" /> January 2012 Lattice Technology, Inc. 11 Exporting XML with Mass Properties 2/2 • Use the –t option to specify the tessellation tolerance to use when calculating the mass properties. Basic Format: xvlbomassembler.exe < -i input_file> < -o output_file> [-m] [-t type num tol] Example: xvlbomassembler.exe -i sample.xv2 -o sample.xml –m –t 4 8 0.1 Parameter Description type Specify one of the following integer values to indicate the polygon division type. 1: Rough 2: Fast 3: Normal 4: Fine 5: Analytic num Maximum number of divisions for polygon division (an integer between 1 and 32). tol Specify the tolerance for polygon division. * When the –t option is not specified, default values are used. January 2012 Lattice Technology, Inc. 12 Exporting Log Files • Use the –r option to export a log file. Example: xvlbomassembler.exe -i sample.xv2 -o sample.xml –r Parameter Description A log file is exported in the same folder as the output file. The log file name is the same as the output file but with the extension ".log“. -r January 2012 Return code: 0 Successful completion. -1 Incorrect format. -2 Cannot find license. -3 Cannot open input file. -4 Cannot open output file. -5 The specified input or output file name extension is invalid. -6 The version of the XVL file is not supported. -7 Schema error for input XML file. -8 Entity ID or instance ID update error for input XVL file. (An XVL assembly or part name is not set correctly, for example) -100 An unexpected error occurred. Lattice Technology, Inc. 13 XML Format • For details of the XML format, please see XVL_BOM_AssemblerXML_Format.pdf.* * XVL_BOM_Assembler-XML_Format.pdf is located in: \Lt_BomAssembler\Doc January 2012 Lattice Technology, Inc. 14 Questions? E. T. F. W. January 2012 support@lattice3d.com +1.415.274.1670 +1.415.274.1671 www.lattice3d.com Lattice Technology, Inc. 15