Parameters to SW_test
This commit is contained in:
parent
42afe14068
commit
4b25f1440a
|
|
@ -287,6 +287,10 @@ Public Class GUI
|
|||
|
||||
' --- When export to SW button is pressed ---
|
||||
Private Sub ExportSWButton_Click(sender As Object, e As EventArgs) Handles ExportSWButton.Click
|
||||
Dim exportTable As DataTable
|
||||
exportTable = Create_ExportTable()
|
||||
|
||||
|
||||
Program.Build_Grating()
|
||||
|
||||
'Test för att SW API
|
||||
|
|
@ -297,4 +301,19 @@ Public Class GUI
|
|||
Program.Create_Drawing()
|
||||
End Sub
|
||||
|
||||
Private Function Create_ExportTable() As DataTable
|
||||
Dim gratingTable As DataTable
|
||||
gratingTable.Columns.Add("TYPE", GetType(String))
|
||||
gratingTable.Columns.Add("SERRATED", GetType(Boolean))
|
||||
gratingTable.Columns.Add("WIDTH", GetType(Decimal))
|
||||
gratingTable.Columns.Add("LENGTH", GetType(Decimal))
|
||||
|
||||
gratingTable.Rows.Add()
|
||||
gratingTable.Rows(0)("TYPE") = "pressure_welded" ' Här behövs namn på HLCt modellen
|
||||
gratingTable.Rows(0)("SERRATED") = False
|
||||
gratingTable.Rows(0)("WIDTH") = CDec(WidthBox.Text)
|
||||
gratingTable.Rows(0)("LENGTH") = CDec(LengthBox.Text)
|
||||
|
||||
Return gratingTable
|
||||
End Function
|
||||
End Class
|
||||
|
|
@ -10,15 +10,17 @@ Public Class Program
|
|||
adminClass.updateDatabase()
|
||||
End Sub
|
||||
|
||||
Public Shared Sub Build_Grating()
|
||||
Public Shared Sub Build_Grating(impTable As DataTable)
|
||||
XCCBaseClass.newDesign()
|
||||
ExternalClass.PopulateTamplateXMLGroup()
|
||||
|
||||
Dim inst_ As Integer = 0
|
||||
Dim parentID As Integer = 0
|
||||
inst_ = ExternalClass.instantiate_parts(parentID, "pressure_welded", "")
|
||||
ExternalClass.modify_parameter_value("DP_GRATING_WIDTH", inst_, 1000)
|
||||
ExternalClass.modify_parameter_value("DP_GRATING_LENGTH", inst_, 500)
|
||||
Dim gratingParameters As DataRow = impTable.Rows(0)
|
||||
inst_ = ExternalClass.instantiate_parts(parentID, gratingParameters("TYPE"), "") ' Ange pressure welded eller type A, Serrated?
|
||||
ExternalClass.modify_parameter_value("DP_GRATING_WIDTH", inst_, gratingParameters("WIDTH")) 'Länka width
|
||||
ExternalClass.modify_parameter_value("DP_GRATING_LENGTH", inst_, gratingParameters("LENGTH")) 'Länka length
|
||||
'Lägg in fler DP
|
||||
|
||||
importClass.copyGroupsByDataSet(ExternalClass.groupds_new)
|
||||
Dim grNr = groupClass.NewGroupID
|
||||
|
|
|
|||
Loading…
Reference in New Issue