Message 1 of 4
Insert Bill of materials in HTML

Not applicable
05-29-2018
06:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
Currently we are trying to make a html file using ilogic.
The file will be used to inform people how to assamble a pallet wich is used in our milling machine.
We already have the following code;
Format:HTML Format Version:1.0 StartHTML: 165 EndHTML: 27122 StartFragment: 314 EndFragment: 27090 StartSelection: 314 EndSelection: 314SyntaxEditor Code Snippet
'HTML bestand maken met benodigde gegevens'create an html report sample report_title = "Design Rapport klem Assembly " & ThisDoc.PathAndFileName(True) 'variable used the body of the html description = "Opspangegevens" 'variable used in the body of the html Dim oFile As System.IO.File Dim oWrite As System.IO.StreamWriter TableMembers = New String () {"Programmeur", "Materiaal", "Uitgangsmaten", "Aanhaalmoment", "Werkordernummer"} 'parameters to include in table html_filename = ThisDoc.PathAndFileName(False) & ".html" oWrite = oFile.CreateText(html_filename) 'name and path of html file to create/overwrite oWrite.WriteLine("<HTML>") oWrite.WriteLine("<HEAD>") oWrite.WriteLine("<META CONTENT=""text/html; charset=iso-8859-1"" HTTP-EQUIV=""Content-Type"" >") oWrite.WriteLine("<TITLE>") oWrite.WriteLine(report_title) 'set the html search title with local variable oWrite.WriteLine("</TITLE>") oWrite.WriteLine("</HEAD>") oWrite.WriteLine("<BODY BGCOLOR=""#FFFFF1"">") oWrite.WriteLine("<B><EM><H3>") oWrite.WriteLine(report_title) 'first line of the report oWrite.WriteLine("</B></EM></H3>") oWrite.WriteLine("<B>Date & Time: </B>") oWrite.WriteLine(Now()) 'today's date and time on the second line oWrite.WriteLine("<BR>") oWrite.WriteLine("<B>Description: </B>") oWrite.WriteLine(description) 'desciption string goes on the third line of the report oWrite.WriteLine("<BR>") oWrite.WriteLine("<B>Customer:</B> Customer.<BR><BR>") oWrite.WriteLine("<TABLE BORDER=""1"" WIDTH=""650"">") 'table width in pixels. Use % to adjust to browser size. 'create html text lines nessesary to build the table for each parameter specified in the TableMembers array For Each pName As String in TableMembers oWrite.WriteLine("<TR><TD WIDTH=""50%"">") 'column width is half of table size oWrite.WriteLine(pName) ' parameter name oWrite.WriteLine("</TD><TD>") oWrite.WriteLine(DynaParam(pName) ) ' parameter value oWrite.WriteLine("</TD> </TR>") Next 'save iso view to jpg imagedoc = ThisDoc.PathAndFileName(False) & ".jpg" oCamera = InventorVb.Application.ActiveView.Camera 'current iso view oCamera.fit oCamera.apply InventorVb.Application.ActiveView.SaveAsBitmap(imagedoc,1680, 1050) oWrite.WriteLine("</TABLE>") ' end the table oWrite.WriteLine("Afbeelding opspanning.<BR>") 'footer notes oWrite.WriteLine("")'footer notes oWrite.WriteLine("<IMG src=""" & imagedoc & """ ALT=""text"" WIDTH = 650 ALIGN = <RIGHT> ") oWrite.WriteLine("</BODY>") oWrite.Close() 'option to view report go = MessageBox.Show("Wilt u het Design Rapport bekijken?", "iLogic Rapporten", MessageBoxButtons.YesNo) If go = 6 Then ThisDoc.Launch(html_filename)
This code creates the following HTML file;
The only thing that's missing is the BOM of the assembly.
We tried al lot of things to put it in the html but none of them worked.
Does somebody know how to fix this?
Thanks a lot!
Rik