Skip to content
Snippets Groups Projects
Commit e5c0e6b1 authored by Sören Münker's avatar Sören Münker
Browse files

Added meta data excel script for liaison & mw

parent bd1b8a25
No related branches found
No related tags found
1 merge request!2Experiments
......@@ -17,6 +17,8 @@ Public Class AndOrDataExtraction
Public iBoundingBoxCode As Integer
Public intStep As Integer
Public dCollSens As Double
Public t_liaison As Double
Public t_mw As Double
Public xlsPath As String
Public xlsFileName As String
Public cAllProducts As New ArrayList
......@@ -46,8 +48,8 @@ Public Class AndOrDataExtraction
bAutomaticStep = True
intStep = 13
dCollSens = 1
xlsPath = "D:\mikep\Files\RWTH\Master Produktionstechnik\Masterarbeit\Experimente\Protocols\"
xlsFileName = "UglyStikRC"
xlsPath = "D:\03_Dissertation\20_Tools\CATIA_NET\ProgData\"
xlsFileName = "test_AOG"
CATIA = GetObject(, "CATIA.Application")
If CATIA Is Nothing Then CATIA = CreateObject("CATIA.Application")
......@@ -78,6 +80,50 @@ Public Class AndOrDataExtraction
Debug.Print("AND/OR edges: " + CStr(numEdges))
End If
SaveMetaDataToExcel_MW()
End Sub
Sub SaveMetaDataToExcel_MW()
'Use Excel
Dim oExcel As Microsoft.Office.Interop.Excel.Application
oExcel = CreateObject("Excel.Application")
oExcel.Visible = True
oExcel.Workbooks.Add()
oExcel.ActiveWorkbook.Sheets.Add.Name = "meta_data_mw"
Dim objSheet_m As Object
objSheet_m = oExcel.ActiveWorkbook.Worksheets(1)
'Output Metadata
objSheet_m.Cells(1, 1).Value = "n_parts"
objSheet_m.Cells(1, 2).Value = cAllProducts.Count
objSheet_m.Cells(2, 1).Value = "bb_projection_check"
objSheet_m.Cells(2, 2).Value = bBoundingBoxProjectionCheck
objSheet_m.Cells(3, 1).Value = "bounding_box_code_type"
objSheet_m.Cells(3, 2).Value = iBoundingBoxCode
objSheet_m.Cells(4, 1).Value = "step_size"
objSheet_m.Cells(4, 2).Value = intStep
objSheet_m.Cells(5, 1).Value = "step_size_sensitivity"
objSheet_m.Cells(5, 2).Value = dCollSens
objSheet_m.Cells(6, 1).Value = "t_liaison"
objSheet_m.Cells(6, 2).Value = t_liaison
objSheet_m.Cells(7, 1).Value = "t_mw"
objSheet_m.Cells(7, 2).Value = t_mw
'Save and close excel workbook
oExcel.ActiveWorkbook.SaveAs(Filename:=xlsPath & xlsFileName & "_meta_data_mw.xlsx")
oExcel.ActiveWorkbook.Close(SaveChanges:=True)
'close the excel application
oExcel.Quit()
ReleaseObject(oExcel)
End Sub
Sub AndOrGraph(prod As List(Of Integer), nodes As List(Of List(Of Integer)))
......@@ -481,6 +527,7 @@ Public Class AndOrDataExtraction
Dim MillisecondsElapsed As Double
MillisecondsElapsed = (Now - MovingWedgeStartTime).TotalMilliseconds
SecondsElapsed = Math.Round(MillisecondsElapsed / 1000.0, 2)
t_mw = SecondsElapsed
MsgBox("Moving wedge extraction took " & CStr(SecondsElapsed) & " seconds")
'Use Excel
......@@ -596,6 +643,7 @@ Public Class AndOrDataExtraction
Dim MillisecondsElapsed As Double
MillisecondsElapsed = (Now - LiaisonStartTime).TotalMilliseconds
SecondsElapsed = Math.Round(MillisecondsElapsed / 1000.0, 2)
t_liaison = SecondsElapsed
MsgBox("Liaison graph extraction took " & CStr(SecondsElapsed) & " seconds")
'Save and close excel workbook
......
......@@ -74,8 +74,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="AndOrDataExtraction.vb" />
<Compile Include="AssemblyTiers2.vb" />
<Compile Include="AssemblyTiers3.vb">
<Compile Include="AssemblyTiers2.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.vb">
......
No preview for this file type
No preview for this file type
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment