File structure done and appdata created
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
1827
Icons/AngleCorner.ai
|
Before Width: | Height: | Size: 2.7 KiB |
1808
Icons/AngleSide.ai
|
Before Width: | Height: | Size: 4.3 KiB |
1883
Icons/Radius.ai
BIN
Icons/Radius.png
|
Before Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
1870
Icons/SquareSide.ai
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 7.2 KiB |
|
|
@ -1,8 +1,20 @@
|
||||||
Imports XCCLibrary
|
Imports XCCLibrary
|
||||||
|
Imports System.Environment
|
||||||
|
|
||||||
Public Class AppForm
|
Public Class AppForm
|
||||||
Public Shared fillMode As Boolean
|
Public Shared fillMode As Boolean
|
||||||
|
|
||||||
Sub AppForm_Load() Handles MyBase.Load
|
Sub AppForm_Load() Handles MyBase.Load
|
||||||
|
Dim appData As String = GetFolderPath(SpecialFolder.ApplicationData)
|
||||||
|
Dim appDataDir As New IO.DirectoryInfo(appData & "\Floor Grating Configurator")
|
||||||
|
If Not appDataDir.Exists Then
|
||||||
|
System.IO.Directory.CreateDirectory(appDataDir.FullName)
|
||||||
|
System.IO.File.Create(appDataDir.FullName & "\SavedData.txt").Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim savedData As String() = System.IO.File.ReadAllLines(appDataDir.FullName & "\SavedData.txt")
|
||||||
|
|
||||||
|
|
||||||
Dim dir As New IO.DirectoryInfo("C:\Users\Anton\Documents\Exjobb")
|
Dim dir As New IO.DirectoryInfo("C:\Users\Anton\Documents\Exjobb")
|
||||||
If dir.Exists Then
|
If dir.Exists Then
|
||||||
Individual.filepath = "C:\Users\Anton\Documents\Exjobb"
|
Individual.filepath = "C:\Users\Anton\Documents\Exjobb"
|
||||||
|
|
|
||||||
|
|
@ -237,7 +237,6 @@ Public Class Individual
|
||||||
' --- When calculate button is pressed ---
|
' --- When calculate button is pressed ---
|
||||||
Public Sub Button_Calculate_Click(sender As Object, e As EventArgs)
|
Public Sub Button_Calculate_Click(sender As Object, e As EventArgs)
|
||||||
Grating_Fill.Calculate_Grid()
|
Grating_Fill.Calculate_Grid()
|
||||||
'Grating_Fill.Calculate_Recesses()
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' ---------------------------------- Export to SW ----------------------------------
|
' ---------------------------------- Export to SW ----------------------------------
|
||||||
|
|
@ -245,12 +244,11 @@ Public Class Individual
|
||||||
Private Sub Button_Export_SW_Click(sender As Object, e As EventArgs) Handles Button_Export_SW.Click
|
Private Sub Button_Export_SW_Click(sender As Object, e As EventArgs) Handles Button_Export_SW.Click
|
||||||
If AppForm.fillMode Then
|
If AppForm.fillMode Then
|
||||||
Grating_Fill.Calculate_Grid()
|
Grating_Fill.Calculate_Grid()
|
||||||
'Grating_Fill.Calculate_Recesses()
|
|
||||||
|
|
||||||
Model_3D_Fill.BuildGrid()
|
Model_3D_Fill.BuildGrid()
|
||||||
Else
|
Else
|
||||||
Model_3D.BuildGrating()
|
Model_3D.BuildGrating()
|
||||||
'Drawing.Create_Model_For_Drawing()
|
Drawing.Create_Model_For_Drawing()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,12 +26,13 @@ Partial Class Main_Menu
|
||||||
Me.Button_Multiple = New System.Windows.Forms.Button()
|
Me.Button_Multiple = New System.Windows.Forms.Button()
|
||||||
Me.Button_Individual = New System.Windows.Forms.Button()
|
Me.Button_Individual = New System.Windows.Forms.Button()
|
||||||
Me.Button_FilePath = New System.Windows.Forms.Button()
|
Me.Button_FilePath = New System.Windows.Forms.Button()
|
||||||
|
Me.Button_Order = New System.Windows.Forms.Button()
|
||||||
Me.SuspendLayout()
|
Me.SuspendLayout()
|
||||||
'
|
'
|
||||||
'Button_Settings
|
'Button_Settings
|
||||||
'
|
'
|
||||||
Me.Button_Settings.Location = New System.Drawing.Point(68, 59)
|
Me.Button_Settings.Location = New System.Drawing.Point(68, 59)
|
||||||
Me.Button_Settings.Margin = New System.Windows.Forms.Padding(2, 2, 2, 2)
|
Me.Button_Settings.Margin = New System.Windows.Forms.Padding(2)
|
||||||
Me.Button_Settings.Name = "Button_Settings"
|
Me.Button_Settings.Name = "Button_Settings"
|
||||||
Me.Button_Settings.Size = New System.Drawing.Size(127, 41)
|
Me.Button_Settings.Size = New System.Drawing.Size(127, 41)
|
||||||
Me.Button_Settings.TabIndex = 5
|
Me.Button_Settings.TabIndex = 5
|
||||||
|
|
@ -40,6 +41,7 @@ Partial Class Main_Menu
|
||||||
'
|
'
|
||||||
'Button_Multiple
|
'Button_Multiple
|
||||||
'
|
'
|
||||||
|
Me.Button_Multiple.Enabled = False
|
||||||
Me.Button_Multiple.Location = New System.Drawing.Point(734, 439)
|
Me.Button_Multiple.Location = New System.Drawing.Point(734, 439)
|
||||||
Me.Button_Multiple.Name = "Button_Multiple"
|
Me.Button_Multiple.Name = "Button_Multiple"
|
||||||
Me.Button_Multiple.Size = New System.Drawing.Size(117, 93)
|
Me.Button_Multiple.Size = New System.Drawing.Size(117, 93)
|
||||||
|
|
@ -49,6 +51,7 @@ Partial Class Main_Menu
|
||||||
'
|
'
|
||||||
'Button_Individual
|
'Button_Individual
|
||||||
'
|
'
|
||||||
|
Me.Button_Individual.Enabled = False
|
||||||
Me.Button_Individual.Location = New System.Drawing.Point(734, 302)
|
Me.Button_Individual.Location = New System.Drawing.Point(734, 302)
|
||||||
Me.Button_Individual.Name = "Button_Individual"
|
Me.Button_Individual.Name = "Button_Individual"
|
||||||
Me.Button_Individual.Size = New System.Drawing.Size(117, 93)
|
Me.Button_Individual.Size = New System.Drawing.Size(117, 93)
|
||||||
|
|
@ -65,17 +68,27 @@ Partial Class Main_Menu
|
||||||
Me.Button_FilePath.Text = "Filepath"
|
Me.Button_FilePath.Text = "Filepath"
|
||||||
Me.Button_FilePath.UseVisualStyleBackColor = True
|
Me.Button_FilePath.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
|
'Button_Order
|
||||||
|
'
|
||||||
|
Me.Button_Order.Location = New System.Drawing.Point(194, 353)
|
||||||
|
Me.Button_Order.Name = "Button_Order"
|
||||||
|
Me.Button_Order.Size = New System.Drawing.Size(117, 65)
|
||||||
|
Me.Button_Order.TabIndex = 7
|
||||||
|
Me.Button_Order.Text = "Create Order"
|
||||||
|
Me.Button_Order.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
'Main_Menu
|
'Main_Menu
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
Me.ClientSize = New System.Drawing.Size(1046, 627)
|
Me.ClientSize = New System.Drawing.Size(1046, 627)
|
||||||
|
Me.Controls.Add(Me.Button_Order)
|
||||||
Me.Controls.Add(Me.Button_FilePath)
|
Me.Controls.Add(Me.Button_FilePath)
|
||||||
Me.Controls.Add(Me.Button_Settings)
|
Me.Controls.Add(Me.Button_Settings)
|
||||||
Me.Controls.Add(Me.Button_Multiple)
|
Me.Controls.Add(Me.Button_Multiple)
|
||||||
Me.Controls.Add(Me.Button_Individual)
|
Me.Controls.Add(Me.Button_Individual)
|
||||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
|
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
|
||||||
Me.Margin = New System.Windows.Forms.Padding(2, 2, 2, 2)
|
Me.Margin = New System.Windows.Forms.Padding(2)
|
||||||
Me.Name = "Main_Menu"
|
Me.Name = "Main_Menu"
|
||||||
Me.Text = "Main_Menu"
|
Me.Text = "Main_Menu"
|
||||||
Me.ResumeLayout(False)
|
Me.ResumeLayout(False)
|
||||||
|
|
@ -86,4 +99,5 @@ Partial Class Main_Menu
|
||||||
Friend WithEvents Button_Multiple As Button
|
Friend WithEvents Button_Multiple As Button
|
||||||
Friend WithEvents Button_Individual As Button
|
Friend WithEvents Button_Individual As Button
|
||||||
Friend WithEvents Button_FilePath As Button
|
Friend WithEvents Button_FilePath As Button
|
||||||
|
Friend WithEvents Button_Order As Button
|
||||||
End Class
|
End Class
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,55 @@
|
||||||
Public Class Main_Menu
|
|
||||||
|
|
||||||
|
Public Class Main_Menu
|
||||||
|
|
||||||
|
Private Sub Generate_Folders()
|
||||||
|
Settings.folderPaths.Add("object_" & Data.objectNum, Settings.folderPaths("order") & "\Object " & Data.objectNum) 'FIXA
|
||||||
|
System.IO.Directory.CreateDirectory(Settings.folderPaths("object_" & Data.objectNum))
|
||||||
|
|
||||||
|
' 3D-Models
|
||||||
|
Settings.folderPaths.Add("object_" & Data.objectNum & "_models3D", Settings.folderPaths("object_" & Data.objectNum) & "\3D-Models") 'FIXA
|
||||||
|
System.IO.Directory.CreateDirectory(Settings.folderPaths("object_" & Data.objectNum & "_models3D"))
|
||||||
|
Settings.folderPaths.Add("object_" & Data.objectNum & "_models3D_gratings", Settings.folderPaths("object_" & Data.objectNum & "_models3D") & "\Floor Gratings") 'FIXA
|
||||||
|
System.IO.Directory.CreateDirectory(Settings.folderPaths("object_" & Data.objectNum & "_models3D_gratings"))
|
||||||
|
Settings.folderPaths.Add("object_" & Data.objectNum & "_models3D_gratings_sw", Settings.folderPaths("object_" & Data.objectNum & "_models3D_gratings") & "\SLD") 'FIXA
|
||||||
|
System.IO.Directory.CreateDirectory(Settings.folderPaths("object_" & Data.objectNum & "_models3D_gratings_sw"))
|
||||||
|
Settings.folderPaths.Add("object_" & Data.objectNum & "_models3D_gratings_sw_support", Settings.folderPaths("object_" & Data.objectNum & "_models3D_gratings_sw") & "\Support Models") 'FIXA
|
||||||
|
System.IO.Directory.CreateDirectory(Settings.folderPaths("object_" & Data.objectNum & "_models3D_gratings_sw_support"))
|
||||||
|
Settings.folderPaths.Add("object_" & Data.objectNum & "_models3D_gratings_stp", Settings.folderPaths("object_" & Data.objectNum & "_models3D_gratings") & "\STP") 'FIXA
|
||||||
|
System.IO.Directory.CreateDirectory(Settings.folderPaths("object_" & Data.objectNum & "_models3D_gratings_stp"))
|
||||||
|
Settings.folderPaths.Add("object_" & Data.objectNum & "_models3D_frames", Settings.folderPaths("object_" & Data.objectNum & "_models3D") & "\Frames") 'FIXA
|
||||||
|
System.IO.Directory.CreateDirectory(Settings.folderPaths("object_" & Data.objectNum & "_models3D_frames"))
|
||||||
|
Settings.folderPaths.Add("object_" & Data.objectNum & "_models3D_frames_sw", Settings.folderPaths("object_" & Data.objectNum & "_models3D_frames") & "\SLD") 'FIXA
|
||||||
|
System.IO.Directory.CreateDirectory(Settings.folderPaths("object_" & Data.objectNum & "_models3D_frames_sw"))
|
||||||
|
Settings.folderPaths.Add("object_" & Data.objectNum & "_models3D_frames_sw_support", Settings.folderPaths("object_" & Data.objectNum & "_models3D_frames_sw") & "\Support Models") 'FIXA
|
||||||
|
System.IO.Directory.CreateDirectory(Settings.folderPaths("object_" & Data.objectNum & "_models3D_frames_sw_support"))
|
||||||
|
Settings.folderPaths.Add("object_" & Data.objectNum & "_models3D_frames_stp", Settings.folderPaths("object_" & Data.objectNum & "_models3D_frames") & "\STP") 'FIXA
|
||||||
|
System.IO.Directory.CreateDirectory(Settings.folderPaths("object_" & Data.objectNum & "_models3D_frames_stp"))
|
||||||
|
|
||||||
|
' Drawings
|
||||||
|
Settings.folderPaths.Add("object_" & Data.objectNum & "_drawings", Settings.folderPaths("object_" & Data.objectNum) & "\Drawings") 'FIXA
|
||||||
|
System.IO.Directory.CreateDirectory(Settings.folderPaths("object_" & Data.objectNum & "_drawings"))
|
||||||
|
Settings.folderPaths.Add("object_" & Data.objectNum & "_drawings_gratings", Settings.folderPaths("object_" & Data.objectNum & "_drawings") & "\Floor Gratings") 'FIXA
|
||||||
|
System.IO.Directory.CreateDirectory(Settings.folderPaths("object_" & Data.objectNum & "_drawings_gratings"))
|
||||||
|
Settings.folderPaths.Add("object_" & Data.objectNum & "_drawings_gratings_sw", Settings.folderPaths("object_" & Data.objectNum & "_drawings_gratings") & "\SLD") 'FIXA
|
||||||
|
System.IO.Directory.CreateDirectory(Settings.folderPaths("object_" & Data.objectNum & "_drawings_gratings_sw"))
|
||||||
|
Settings.folderPaths.Add("object_" & Data.objectNum & "_drawings_gratings_pdf", Settings.folderPaths("object_" & Data.objectNum & "_drawings_gratings") & "\PDF") 'FIXA
|
||||||
|
System.IO.Directory.CreateDirectory(Settings.folderPaths("object_" & Data.objectNum & "_drawings_gratings_pdf"))
|
||||||
|
Settings.folderPaths.Add("object_" & Data.objectNum & "_drawings_frames", Settings.folderPaths("object_" & Data.objectNum & "_drawings") & "\Frames") 'FIXA
|
||||||
|
System.IO.Directory.CreateDirectory(Settings.folderPaths("object_" & Data.objectNum & "_drawings_frames"))
|
||||||
|
Settings.folderPaths.Add("object_" & Data.objectNum & "_drawings_frames_sw", Settings.folderPaths("object_" & Data.objectNum & "_drawings_frames") & "\SLD") 'FIXA
|
||||||
|
System.IO.Directory.CreateDirectory(Settings.folderPaths("object_" & Data.objectNum & "_drawings_frames_sw"))
|
||||||
|
Settings.folderPaths.Add("object_" & Data.objectNum & "_drawings_frames_pdf", Settings.folderPaths("object_" & Data.objectNum & "_drawings_frames") & "\PDF") 'FIXA
|
||||||
|
System.IO.Directory.CreateDirectory(Settings.folderPaths("object_" & Data.objectNum & "_drawings_frames_pdf"))
|
||||||
|
|
||||||
|
' Quote
|
||||||
|
Settings.folderPaths.Add("object_" & Data.objectNum & "_quote", Settings.folderPaths("object_" & Data.objectNum) & "\Quote") 'FIXA
|
||||||
|
System.IO.Directory.CreateDirectory(Settings.folderPaths("object_" & Data.objectNum & "_quote"))
|
||||||
|
|
||||||
|
' Placement Guides
|
||||||
|
Settings.folderPaths.Add("object_" & Data.objectNum & "_guide", Settings.folderPaths("object_" & Data.objectNum) & "\Placement Guides") 'FIXA
|
||||||
|
System.IO.Directory.CreateDirectory(Settings.folderPaths("object_" & Data.objectNum & "_guide"))
|
||||||
|
End Sub
|
||||||
Private Sub Button_Individual_Click(sender As Object, e As EventArgs) Handles Button_Individual.Click
|
Private Sub Button_Individual_Click(sender As Object, e As EventArgs) Handles Button_Individual.Click
|
||||||
If AppForm.fillMode = True Then
|
If AppForm.fillMode = True Then
|
||||||
Individual.Panel_Data.Controls.RemoveByKey("Label_Max_Load")
|
Individual.Panel_Data.Controls.RemoveByKey("Label_Max_Load")
|
||||||
|
|
@ -14,6 +65,9 @@
|
||||||
AppForm.Panel_Start.Controls.Add(Individual)
|
AppForm.Panel_Start.Controls.Add(Individual)
|
||||||
Individual.Load_GUI()
|
Individual.Load_GUI()
|
||||||
Individual.Show()
|
Individual.Show()
|
||||||
|
|
||||||
|
Data.objectNum += 1
|
||||||
|
Generate_Folders()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Button_Multiple_Click(sender As Object, e As EventArgs) Handles Button_Multiple.Click
|
Private Sub Button_Multiple_Click(sender As Object, e As EventArgs) Handles Button_Multiple.Click
|
||||||
|
|
@ -23,6 +77,9 @@
|
||||||
AppForm.Panel_Start.Controls.Add(Individual)
|
AppForm.Panel_Start.Controls.Add(Individual)
|
||||||
Individual.Load_GUI()
|
Individual.Load_GUI()
|
||||||
Individual.Show()
|
Individual.Show()
|
||||||
|
|
||||||
|
Data.objectNum += 1
|
||||||
|
Generate_Folders()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' ---------------------------------- Settings ----------------------------------
|
' ---------------------------------- Settings ----------------------------------
|
||||||
|
|
@ -35,25 +92,16 @@
|
||||||
Dim ofd As FolderBrowserDialog = New FolderBrowserDialog
|
Dim ofd As FolderBrowserDialog = New FolderBrowserDialog
|
||||||
If ofd.ShowDialog() <> DialogResult.Cancel Then
|
If ofd.ShowDialog() <> DialogResult.Cancel Then
|
||||||
Settings.exportFolder = ofd.SelectedPath
|
Settings.exportFolder = ofd.SelectedPath
|
||||||
|
|
||||||
Settings.folderPaths.Add("order", Settings.exportFolder & "\Order " & GUI_Export.Get_RandomNumber(1000, 9999))
|
|
||||||
System.IO.Directory.CreateDirectory(Settings.folderPaths("order"))
|
|
||||||
|
|
||||||
Settings.folderPaths.Add("object_" & 1, Settings.folderPaths("order") & "\Object " & 1) 'FIXA
|
|
||||||
System.IO.Directory.CreateDirectory(Settings.folderPaths("object_" & 1))
|
|
||||||
|
|
||||||
Settings.folderPaths.Add("object_" & 1 & "_models3D", Settings.folderPaths("object_" & 1) & "\3D-models") 'FIXA
|
|
||||||
System.IO.Directory.CreateDirectory(Settings.folderPaths("object_" & 1 & "_models3D"))
|
|
||||||
|
|
||||||
Settings.folderPaths.Add("object_" & 1 & "_models3D_grating", Settings.folderPaths("object_" & 1 & "_models3D") & "\Floor gratings") 'FIXA
|
|
||||||
System.IO.Directory.CreateDirectory(Settings.folderPaths("object_" & 1 & "_models3D_grating"))
|
|
||||||
|
|
||||||
Settings.folderPaths.Add("object_" & 1 & "_models3D_grating_support", Settings.folderPaths("object_" & 1 & "_models3D_grating") & "\Support models") 'FIXA
|
|
||||||
System.IO.Directory.CreateDirectory(Settings.folderPaths("object_" & 1 & "_models3D_grating_support"))
|
|
||||||
|
|
||||||
Settings.folderPaths.Add("object_" & 1 & "_models3D_frame", Settings.folderPaths("object_" & 1 & "_models3D") & "\Frames") 'FIXA
|
|
||||||
System.IO.Directory.CreateDirectory(Settings.folderPaths("object_" & 1 & "_models3D_frame"))
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Button_Order_Click(sender As Object, e As EventArgs) Handles Button_Order.Click
|
||||||
|
Button_Individual.Enabled = True
|
||||||
|
Button_Multiple.Enabled = True
|
||||||
|
|
||||||
|
Settings.folderPaths.Add("order", Settings.exportFolder & "\Order " & GUI_Export.Get_RandomNumber(1000, 9999))
|
||||||
|
System.IO.Directory.CreateDirectory(Settings.folderPaths("order"))
|
||||||
|
|
||||||
|
Data.objectNum = 0
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
Imports XCCLibrary
|
Imports XCCLibrary
|
||||||
Public Class Settings
|
Public Class Settings
|
||||||
Public Shared filesFolder As String '= Individual.filepath ' Hämta från settings
|
Public Shared filesFolder As String
|
||||||
Public Shared HLCtFolder As String '= Individual.filepath & "\X2021" ' Hämta från settings
|
Public Shared HLCtFolder As String
|
||||||
Public Shared exportFolder As String
|
Public Shared exportFolder As String
|
||||||
Public Shared folderPaths As New Dictionary(Of String, String)
|
Public Shared folderPaths As New Dictionary(Of String, String)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
Public Class Data
|
Public Class Data
|
||||||
|
Public Shared objectNum As Integer
|
||||||
|
|
||||||
Public Shared grossAreaPoints As New DataTable
|
Public Shared grossAreaPoints As New DataTable
|
||||||
Public Shared gratingPoints As New DataTable
|
Public Shared gratingPoints As New DataTable
|
||||||
Public Shared gratingMiddlePoints As New DataTable
|
Public Shared gratingMiddlePoints As New DataTable
|
||||||
|
|
|
||||||
|
|
@ -120,6 +120,7 @@ Public Class Grating_Fill
|
||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
' Not used because of better method found
|
||||||
Public Shared Sub Calculate_Recesses()
|
Public Shared Sub Calculate_Recesses()
|
||||||
Dim cornerAngleCounter As Integer = 0
|
Dim cornerAngleCounter As Integer = 0
|
||||||
For k = 0 To Data.recessData.Rows.Count - 1
|
For k = 0 To Data.recessData.Rows.Count - 1
|
||||||
|
|
|
||||||
|
|
@ -17,27 +17,17 @@ Public Class GUI_Export
|
||||||
Create_GratingPicture(doc)
|
Create_GratingPicture(doc)
|
||||||
Create_GratingData(doc)
|
Create_GratingData(doc)
|
||||||
|
|
||||||
doc.ExportAsFixedFormat(Individual.filepath & "\X2021\Specification_PDF\Specification.pdf", Word.WdExportFormat.wdExportFormatPDF)
|
doc.ExportAsFixedFormat(Settings.folderPaths("object_" & Data.objectNum & "_quote") & "\Specification.pdf", Word.WdExportFormat.wdExportFormatPDF)
|
||||||
doc.Close(False)
|
doc.Close(False)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Shared Sub Generate_Screenshot()
|
Private Shared Sub Generate_Screenshot()
|
||||||
'Dim startPoint As New Point(Me.Left + Panel_Grating.Left, Me.Top + Panel_Grating.Top)
|
|
||||||
'Dim startPoint As New Point
|
|
||||||
'startPoint = Individual.Panel_Grating.PointToScreen(Point.Empty)
|
|
||||||
|
|
||||||
'Dim tempImg As New Bitmap(Individual.Panel_Grating.Width - 1, Individual.Panel_Grating.Height - 1)
|
|
||||||
'Dim test As Graphics = Graphics.FromImage(tempImg)
|
|
||||||
'test.CopyFromScreen(startPoint, New Point(0, 0), tempImg.Size)
|
|
||||||
'tempImg.Save(Individual.filepath & "\X2021\Specification_PDF\GUI.png", Imaging.ImageFormat.Png)
|
|
||||||
|
|
||||||
|
|
||||||
Dim gratingImg As New Bitmap(Individual.Panel_Grating.Width - 1, Individual.Panel_Grating.Height - 1)
|
Dim gratingImg As New Bitmap(Individual.Panel_Grating.Width - 1, Individual.Panel_Grating.Height - 1)
|
||||||
Dim graphicImg As Graphics = Graphics.FromImage(gratingImg)
|
Dim graphicImg As Graphics = Graphics.FromImage(gratingImg)
|
||||||
|
|
||||||
Draw_Grating.Draw_Grating(graphicImg, 12)
|
Draw_Grating.Draw_Grating(graphicImg, 12)
|
||||||
|
|
||||||
gratingImg.Save(Individual.filepath & "\X2021\Specification_PDF\GUI.png", Imaging.ImageFormat.Png)
|
gratingImg.Save(Settings.folderPaths("object_" & Data.objectNum & "_quote") & "\GUI.png", Imaging.ImageFormat.Png)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
@ -49,7 +39,7 @@ Public Class GUI_Export
|
||||||
headerTable = doc.Sections(1).Headers(Word.WdHeaderFooterIndex.wdHeaderFooterPrimary).Range.
|
headerTable = doc.Sections(1).Headers(Word.WdHeaderFooterIndex.wdHeaderFooterPrimary).Range.
|
||||||
Tables.Add(doc.Sections(1).Headers(Word.WdHeaderFooterIndex.wdHeaderFooterPrimary).Range, 1, 2)
|
Tables.Add(doc.Sections(1).Headers(Word.WdHeaderFooterIndex.wdHeaderFooterPrimary).Range, 1, 2)
|
||||||
|
|
||||||
headerTable.Cell(1, 1).Range.InlineShapes.AddPicture(Individual.filepath & "\X2021\Specification_PDF\Weland_Logo.png")
|
headerTable.Cell(1, 1).Range.InlineShapes.AddPicture(Individual.filepath & "\X2021\Files Needed\Weland_Logo.png")
|
||||||
headerTable.Cell(1, 1).Range.InlineShapes(1).ScaleHeight = 50
|
headerTable.Cell(1, 1).Range.InlineShapes(1).ScaleHeight = 50
|
||||||
headerTable.Cell(1, 1).Range.InlineShapes(1).ScaleWidth = 50
|
headerTable.Cell(1, 1).Range.InlineShapes(1).ScaleWidth = 50
|
||||||
|
|
||||||
|
|
@ -209,7 +199,7 @@ Public Class GUI_Export
|
||||||
drawingPara = doc.Content.Paragraphs.Add(lineRange)
|
drawingPara = doc.Content.Paragraphs.Add(lineRange)
|
||||||
drawingPara.Range.InsertParagraphBefore()
|
drawingPara.Range.InsertParagraphBefore()
|
||||||
drawingPara.Format.SpaceBefore = 10
|
drawingPara.Format.SpaceBefore = 10
|
||||||
drawingPara.Range.InlineShapes.AddPicture(Individual.filepath & "\X2021\Specification_PDF\GUI.png")
|
drawingPara.Range.InlineShapes.AddPicture(Settings.folderPaths("object_" & Data.objectNum & "_quote") & "\GUI.png")
|
||||||
drawingPara.Range.InlineShapes(1).ScaleHeight = 55
|
drawingPara.Range.InlineShapes(1).ScaleHeight = 55
|
||||||
drawingPara.Range.InlineShapes(1).ScaleWidth = 55
|
drawingPara.Range.InlineShapes(1).ScaleWidth = 55
|
||||||
drawingPara.Format.SpaceAfter = 1
|
drawingPara.Format.SpaceAfter = 1
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,7 @@ Public Class Drawing
|
||||||
Dim iPart As PartDoc
|
Dim iPart As PartDoc
|
||||||
iPart = swApp.ActiveDoc
|
iPart = swApp.ActiveDoc
|
||||||
Dim newName As String
|
Dim newName As String
|
||||||
newName = Individual.filepath & "\Temp" & "\TESTPART" & 1 & ".SLDPRT"
|
newName = Settings.folderPaths("object_" & Data.objectNum & "_models3D_gratings_sw_support") & "\simplified_grating.SLDPRT"
|
||||||
|
|
||||||
Dim config As Configuration
|
Dim config As Configuration
|
||||||
config = iPart.GetActiveConfiguration
|
config = iPart.GetActiveConfiguration
|
||||||
|
|
@ -160,7 +160,7 @@ Public Class Drawing
|
||||||
Dim swSheet As Sheet
|
Dim swSheet As Sheet
|
||||||
swSheet = iDrawing.GetCurrentSheet()
|
swSheet = iDrawing.GetCurrentSheet()
|
||||||
swSheet.SetProperties2(12, 12, 1, 1, False, swSheetWidth, swSheetHeight, True)
|
swSheet.SetProperties2(12, 12, 1, 1, False, swSheetWidth, swSheetHeight, True)
|
||||||
swSheet.SetTemplateName(Individual.filepath & "\X2021\Weland ritningsmallar\A3 Part.slddrt")
|
swSheet.SetTemplateName(Individual.filepath & "\X2021\Files Needed\A3 Part.slddrt")
|
||||||
swSheet.ReloadTemplate(True)
|
swSheet.ReloadTemplate(True)
|
||||||
|
|
||||||
Dim layMgr As LayerMgr
|
Dim layMgr As LayerMgr
|
||||||
|
|
@ -169,7 +169,8 @@ Public Class Drawing
|
||||||
status = layMgr.SetCurrentLayer("Svenska")
|
status = layMgr.SetCurrentLayer("Svenska")
|
||||||
|
|
||||||
Dim myView As View
|
Dim myView As View
|
||||||
myView = iDrawing.CreateDrawViewFromModelView3(Individual.filepath & "\Temp\TESTPART1.SLDPRT", "*Front", swSheetWidth / 2, swSheetHeight / 2, 0)
|
myView = iDrawing.CreateDrawViewFromModelView3(Settings.folderPaths("object_" & Data.objectNum & "_models3D_gratings_sw_support") & "\simplified_grating.SLDPRT",
|
||||||
|
"*Front", swSheetWidth / 2, swSheetHeight / 2, 0)
|
||||||
myView.UseSheetScale() = True
|
myView.UseSheetScale() = True
|
||||||
Dim viewScale1, viewScale2 As Double
|
Dim viewScale1, viewScale2 As Double
|
||||||
Dim lengthForDrawing As Integer = Data.gratingL
|
Dim lengthForDrawing As Integer = Data.gratingL
|
||||||
|
|
@ -285,7 +286,8 @@ Public Class Drawing
|
||||||
Add_Dimensions(sortedMeasurments("Lmes"), CompName, myView, iDrawing, swExtensions, OutLine, scaleDecimal, X_Mid, Y_Mid, "Lmes")
|
Add_Dimensions(sortedMeasurments("Lmes"), CompName, myView, iDrawing, swExtensions, OutLine, scaleDecimal, X_Mid, Y_Mid, "Lmes")
|
||||||
Add_Dimensions(sortedMeasurments("Wmes"), CompName, myView, iDrawing, swExtensions, OutLine, scaleDecimal, X_Mid, Y_Mid, "Wmes")
|
Add_Dimensions(sortedMeasurments("Wmes"), CompName, myView, iDrawing, swExtensions, OutLine, scaleDecimal, X_Mid, Y_Mid, "Wmes")
|
||||||
Dim myView2 As View
|
Dim myView2 As View
|
||||||
myView2 = iDrawing.CreateDrawViewFromModelView3(Individual.filepath & "\Temp\TESTPART1.SLDPRT", "*Bottom", swSheetWidth / 2, OutLine(3) + sideCounter(0) * 0.01 + 0.03, 0)
|
myView2 = iDrawing.CreateDrawViewFromModelView3(Settings.folderPaths("object_" & Data.objectNum & "_models3D_gratings_sw_support") & "\simplified_grating.SLDPRT",
|
||||||
|
"*Bottom", swSheetWidth / 2, OutLine(3) + sideCounter(0) * 0.01 + 0.03, 0)
|
||||||
myView2.UseSheetScale() = True
|
myView2.UseSheetScale() = True
|
||||||
|
|
||||||
Dim OutLine2 = myView2.GetOutline
|
Dim OutLine2 = myView2.GetOutline
|
||||||
|
|
@ -306,8 +308,7 @@ Public Class Drawing
|
||||||
|
|
||||||
Dim longstatus As Integer
|
Dim longstatus As Integer
|
||||||
Dim newName As String
|
Dim newName As String
|
||||||
newName = Individual.filepath & "\Temp" & "\TESTDRAWING" & 1 & ".SLDDRW"
|
newName = Settings.folderPaths("object_" & Data.objectNum & "_drawings_gratings_sw") & "\grating_drawing.SLDDRW"
|
||||||
|
|
||||||
|
|
||||||
status = layMgr.AddLayer("Symbol", "", 0, 0, 2)
|
status = layMgr.AddLayer("Symbol", "", 0, 0, 2)
|
||||||
status = layMgr.SetCurrentLayer("Symbol")
|
status = layMgr.SetCurrentLayer("Symbol")
|
||||||
|
|
@ -330,7 +331,7 @@ Public Class Drawing
|
||||||
Next
|
Next
|
||||||
swSkMgr.AddToDB = False
|
swSkMgr.AddToDB = False
|
||||||
longstatus = iDrawing.SaveAs3(newName, 0, 0)
|
longstatus = iDrawing.SaveAs3(newName, 0, 0)
|
||||||
longstatus = iDrawing.SaveAs3(Individual.filepath & "\Temp" & "\TESTDRAWING" & 1 & ".pdf", 0, 2)
|
longstatus = iDrawing.SaveAs3(Settings.folderPaths("object_" & Data.objectNum & "_drawings_gratings_pdf") & "\grating_drawing.pdf", 0, 2)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Shared Sub Add_Dimensions(points() As Integer, CompName As String, myView As View, iDrawing As DrawingDoc, swExtensions As SldWorks.ModelDocExtension _
|
Private Shared Sub Add_Dimensions(points() As Integer, CompName As String, myView As View, iDrawing As DrawingDoc, swExtensions As SldWorks.ModelDocExtension _
|
||||||
|
|
|
||||||
|
|
@ -298,7 +298,7 @@ Public Class Individual_Frame_3D
|
||||||
For j = 0 To cuttingList.Count - 1
|
For j = 0 To cuttingList.Count - 1
|
||||||
Dim Part = swApp.OpenDoc6(Settings.HLCtFolder & "\HLCt\frame_l_straight.SLDPRT", 1, 0, "", longstatus, longwarnings)
|
Dim Part = swApp.OpenDoc6(Settings.HLCtFolder & "\HLCt\frame_l_straight.SLDPRT", 1, 0, "", longstatus, longwarnings)
|
||||||
|
|
||||||
longstatus = Part.SaveAs3(Individual.filepath & "\Temp\frame_l_end_piece" & j + 1 & ".SLDPRT", 0, 0) 'FIXA ettan
|
longstatus = Part.SaveAs3(Settings.folderPaths("object_" & Data.objectNum & "_models3D_frames_sw_support") & "\frame_l_end_piece" & j + 1 & ".SLDPRT", 0, 0)
|
||||||
|
|
||||||
Dim swEquationMgr As EquationMgr
|
Dim swEquationMgr As EquationMgr
|
||||||
swEquationMgr = Part.GetEquationMgr()
|
swEquationMgr = Part.GetEquationMgr()
|
||||||
|
|
@ -338,7 +338,7 @@ Public Class Individual_Frame_3D
|
||||||
Dim swWarnings As Integer
|
Dim swWarnings As Integer
|
||||||
boolstatus = Part.Save3(1, swErrors, swWarnings)
|
boolstatus = Part.Save3(1, swErrors, swWarnings)
|
||||||
|
|
||||||
swApp.CloseDoc(Individual.filepath & "\Temp\frame_l_end_piece" & j + 1 & ".SLDPRT")
|
swApp.CloseDoc(Settings.folderPaths("object_" & Data.objectNum & "_models3D_frames_sw_support") & "\frame_l_end_piece" & j + 1 & ".SLDPRT")
|
||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
|
||||||
|
|
@ -22,15 +22,15 @@ Public Class Individual_Frame_Drawing
|
||||||
compNames(j) = Settings.filesFolder & "\Files\CADStart\" & frameComponents(frameID)("partName") & ".SLDPRT"
|
compNames(j) = Settings.filesFolder & "\Files\CADStart\" & frameComponents(frameID)("partName") & ".SLDPRT"
|
||||||
coordNames(j) = ""
|
coordNames(j) = ""
|
||||||
Next
|
Next
|
||||||
compNames(compNames.Count - 1) = Individual.filepath & "\Temp\frame_l_end_piece" & i + 1 & ".SLDPRT"
|
compNames(compNames.Count - 1) = Settings.folderPaths("object_" & Data.objectNum & "_models3D_frames_sw_support") & "\frame_l_end_piece" & i + 1 & ".SLDPRT"
|
||||||
coordNames(coordNames.Count - 1) = ""
|
coordNames(coordNames.Count - 1) = ""
|
||||||
|
|
||||||
Dim assemComps As Object
|
Dim assemComps As Object
|
||||||
assemComps = assembly.AddComponents3((compNames), (transMatrix), (coordNames))
|
assemComps = assembly.AddComponents3((compNames), (transMatrix), (coordNames))
|
||||||
|
|
||||||
longstatus = model.SaveAs3(Individual.filepath & "\Temp\frame_assembly" & i + 1 & ".SLDASM", 0, 0)
|
longstatus = model.SaveAs3(Settings.folderPaths("object_" & Data.objectNum & "_models3D_gratings_sw_support") & "\frame_assembly" & i + 1 & ".SLDASM", 0, 0)
|
||||||
|
|
||||||
swApp.CloseDoc(Individual.filepath & "\Temp\frame_assembly" & i + 1 & ".SLDASM")
|
swApp.CloseDoc(Settings.folderPaths("object_" & Data.objectNum & "_models3D_frames_sw_support") & "\frame_assembly" & i + 1 & ".SLDASM")
|
||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
@ -40,10 +40,6 @@ Public Class Individual_Frame_Drawing
|
||||||
|
|
||||||
Dim status As Boolean
|
Dim status As Boolean
|
||||||
|
|
||||||
'Dim iAssembly As IAssemblyDoc
|
|
||||||
'Dim swErrors, swWarnings As Integer
|
|
||||||
'iAssembly = swApp.OpenDoc6(Individual.filepath & "\Temp\frame_assembly" & 1 & ".SLDASM", 2, 1, "", swErrors, swWarnings) 'FIXA
|
|
||||||
|
|
||||||
Dim iDrawing As DrawingDoc
|
Dim iDrawing As DrawingDoc
|
||||||
Dim swSheetWidth As Double
|
Dim swSheetWidth As Double
|
||||||
swSheetWidth = 0.42
|
swSheetWidth = 0.42
|
||||||
|
|
@ -54,7 +50,7 @@ Public Class Individual_Frame_Drawing
|
||||||
Dim swSheet As Sheet
|
Dim swSheet As Sheet
|
||||||
swSheet = iDrawing.GetCurrentSheet()
|
swSheet = iDrawing.GetCurrentSheet()
|
||||||
swSheet.SetProperties2(12, 12, 1, 1, False, swSheetWidth, swSheetHeight, True)
|
swSheet.SetProperties2(12, 12, 1, 1, False, swSheetWidth, swSheetHeight, True)
|
||||||
swSheet.SetTemplateName(Individual.filepath & "\X2021\Weland ritningsmallar\A3 Part.slddrt")
|
swSheet.SetTemplateName(Individual.filepath & "\X2021\Files Needed\A3 Part.slddrt")
|
||||||
swSheet.ReloadTemplate(True)
|
swSheet.ReloadTemplate(True)
|
||||||
swSheet.SetScale(1, 10, False, False)
|
swSheet.SetScale(1, 10, False, False)
|
||||||
swSheet.SetName("Frame 1")
|
swSheet.SetName("Frame 1")
|
||||||
|
|
@ -64,14 +60,15 @@ Public Class Individual_Frame_Drawing
|
||||||
|
|
||||||
For i = 0 To Individual_Frame_3D.cuttingList.Count - 1
|
For i = 0 To Individual_Frame_3D.cuttingList.Count - 1
|
||||||
If i > 0 Then
|
If i > 0 Then
|
||||||
status = iDrawing.NewSheet3("Frame" & i + 1, 12, 12, 1, 10, False, Individual.filepath & "\X2021\Weland ritningsmallar\A3 Part.slddrt",
|
status = iDrawing.NewSheet3("Frame" & i + 1, 12, 12, 1, 10, False, Individual.filepath & "\X2021\Files Needed\A3 Part.slddrt",
|
||||||
swSheetWidth, swSheetHeight, "Same as sheet specified in Document Properties")
|
swSheetWidth, swSheetHeight, "Same as sheet specified in Document Properties")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
status = layMgr.SetCurrentLayer("Svenska")
|
status = layMgr.SetCurrentLayer("Svenska")
|
||||||
|
|
||||||
Dim myView As View
|
Dim myView As View
|
||||||
myView = iDrawing.CreateDrawViewFromModelView3(Individual.filepath & "\Temp\frame_assembly" & i + 1 & ".SLDASM", "*Front", swSheetWidth / 2, swSheetHeight / 2, 0)
|
myView = iDrawing.CreateDrawViewFromModelView3(Settings.folderPaths("object_" & Data.objectNum & "_models3D_frames_sw_support") & "\frame_assembly" & i + 1 & ".SLDASM",
|
||||||
|
"*Front", swSheetWidth / 2, swSheetHeight / 2, 0)
|
||||||
myView.UseSheetScale() = True
|
myView.UseSheetScale() = True
|
||||||
myView.SetDisplayTangentEdges2(2)
|
myView.SetDisplayTangentEdges2(2)
|
||||||
|
|
||||||
|
|
@ -158,10 +155,10 @@ Public Class Individual_Frame_Drawing
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Dim newName As String
|
Dim newName As String
|
||||||
newName = Individual.filepath & "\Temp" & "\FrameDrawing" & ".SLDDRW"
|
newName = Settings.folderPaths("object_" & Data.objectNum & "_drawings_frames_sw") & "\frame_drawing.SLDDRW"
|
||||||
|
|
||||||
status = iDrawing.SaveAs3(newName, 0, 0)
|
status = iDrawing.SaveAs3(newName, 0, 0)
|
||||||
status = iDrawing.SaveAs3(Individual.filepath & "\Temp" & "\FrameDrawing" & ".pdf", 0, 2)
|
status = iDrawing.SaveAs3(Settings.folderPaths("object_" & Data.objectNum & "_drawings_frames_pdf") & "\frame_drawing.pdf", 0, 2)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
Imports XCCLibrary
|
Imports XCCLibrary
|
||||||
|
Imports SldWorks
|
||||||
|
|
||||||
Public Class Model_3D
|
Public Class Model_3D
|
||||||
Private Shared designName As String
|
Private Shared designName As String
|
||||||
|
|
@ -46,10 +47,22 @@ Public Class Model_3D
|
||||||
groupClass.InstantiateGroup(designName, grNr, "START")
|
groupClass.InstantiateGroup(designName, grNr, "START")
|
||||||
|
|
||||||
Recess_Indent()
|
Recess_Indent()
|
||||||
|
Save_Assembly()
|
||||||
|
|
||||||
Individual_Frame_3D.Generate_End_Frame_Pieces()
|
Individual_Frame_3D.Generate_End_Frame_Pieces()
|
||||||
Individual_Frame_Drawing.Create_Assemblies()
|
Individual_Frame_Drawing.Create_Assemblies()
|
||||||
Individual_Frame_Drawing.Generate_Drawings()
|
Individual_Frame_Drawing.Generate_Drawings()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Shared Sub Save_Assembly()
|
||||||
|
Dim swApp As SldWorks.SldWorks
|
||||||
|
swApp = CType(System.Runtime.InteropServices.Marshal.GetActiveObject("SldWorks.Application"), SldWorks.SldWorks)
|
||||||
|
|
||||||
|
Dim status As Boolean
|
||||||
|
|
||||||
|
Dim Assembly As ModelDoc2 = swApp.ActiveDoc()
|
||||||
|
status = Assembly.SaveAs3(Settings.folderPaths("object_" & Data.objectNum & "_models3D_gratings_sw") & "\grating_assembly.SLDASM", 0, 4)
|
||||||
|
Dim a = 1
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Shared Sub Inst_Recesses(parentID As Integer, gratingParameters As DataRow, recessDR As DataRow)
|
Private Shared Sub Inst_Recesses(parentID As Integer, gratingParameters As DataRow, recessDR As DataRow)
|
||||||
|
|
@ -225,48 +238,60 @@ Public Class Model_3D
|
||||||
Dim gratingBodies = components(indexGrating).GetBodies2(0)
|
Dim gratingBodies = components(indexGrating).GetBodies2(0)
|
||||||
|
|
||||||
Dim recessParts = partDT.Select("parentName = '" & gratingPartName & "'")
|
Dim recessParts = partDT.Select("parentName = '" & gratingPartName & "'")
|
||||||
|
'Dim recessParts As DataTable = New DataTable
|
||||||
|
'For Each DR As DataRow In partDT.Rows
|
||||||
|
' Dim partName As String = DR("partName")
|
||||||
|
' If partName.Split("_")(0) = "RECESS" Then
|
||||||
|
' recessParts.Rows.Add(DR)
|
||||||
|
' End If
|
||||||
|
'Next
|
||||||
|
|
||||||
Dim recessPartName As String
|
Dim recessPartName As String
|
||||||
For i = 0 To recessParts.Count - 100 'FIXA (Ska vara "-1")
|
For i = 0 To recessParts.Count - 1
|
||||||
Assembly.ClearSelection2(True)
|
Dim partName As String = recessParts(i)("partName")
|
||||||
|
If partName.Split("_")(0) = "RECESS" Then
|
||||||
|
Assembly.ClearSelection2(True)
|
||||||
|
|
||||||
' Recess part
|
' Recess part
|
||||||
recessPartName = recessParts(i)("partName")
|
recessPartName = partName
|
||||||
boolstatus = AssemblyExtension.SelectByID2(recessPartName & "-1@" & designName, "COMPONENT", 0, 0, 0, False, 0, Nothing, 0)
|
boolstatus = AssemblyExtension.SelectByID2(recessPartName & "-1@" & designName, "COMPONENT", 0, 0, 0, False, 0, Nothing, 0)
|
||||||
Dim recessPart = SelMgr.GetSelectedObject6(1, -1)
|
Dim recessPart = SelMgr.GetSelectedObject6(1, -1)
|
||||||
|
|
||||||
Dim indexRecess As Integer
|
Dim indexRecess As Integer
|
||||||
For j = 0 To components.Length - 1
|
For j = 0 To components.Length - 1
|
||||||
If components(j).Name2 = recessPartName & "-1" Then
|
If components(j).Name2 = recessPartName & "-1" Then
|
||||||
indexRecess = j
|
indexRecess = j
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
Dim recessBodies = components(indexRecess).GetBodies2(0)
|
|
||||||
|
|
||||||
For j = 0 To gratingBodies.Length - 1
|
|
||||||
sldata.Mark = 1
|
|
||||||
|
|
||||||
Dim bodyName As String = gratingBodies(j).Name & "@" & gratingPartName & "-1@" & designName
|
|
||||||
boolstatus = AssemblyExtension.SelectByID2(bodyName, "SOLIDBODY", 0, 0, 0, True, 1, Nothing, 0)
|
|
||||||
|
|
||||||
sldata.Mark = 4
|
|
||||||
|
|
||||||
Dim indexBody As Integer
|
|
||||||
For k = 0 To recessBodies.Length - 1
|
|
||||||
If recessBodies(k).Name = "Boss-Extrude1" Then
|
|
||||||
indexBody = k
|
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Dim recessFace = recessBodies(indexBody).GetFirstFace
|
Dim recessBodies = components(indexRecess).GetBodies2(0)
|
||||||
recessFace.Select4(True, sldata)
|
|
||||||
|
|
||||||
Assembly.FeatureManager.InsertIndent(0.01, 0, False, True, True, False)
|
For j = 0 To gratingBodies.Length - 1
|
||||||
Assembly.ClearSelection2(True)
|
sldata.Mark = 1
|
||||||
Next
|
|
||||||
|
Dim bodyName As String = gratingBodies(j).Name & "@" & gratingPartName & "-1@" & designName
|
||||||
|
boolstatus = AssemblyExtension.SelectByID2(bodyName, "SOLIDBODY", 0, 0, 0, True, 1, Nothing, 0)
|
||||||
|
|
||||||
|
sldata.Mark = 4
|
||||||
|
|
||||||
|
Dim indexBody As Integer
|
||||||
|
For k = 0 To recessBodies.Length - 1
|
||||||
|
If recessBodies(k).Name = "Boss-Extrude1" Then
|
||||||
|
indexBody = k
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Dim recessFace = recessBodies(indexBody).GetFirstFace
|
||||||
|
recessFace.Select4(True, sldata)
|
||||||
|
|
||||||
|
Assembly.FeatureManager.InsertIndent(0.01, 0, False, True, True, False)
|
||||||
|
Assembly.ClearSelection2(True)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Assembly.EditAssembly
|
Assembly.EditAssembly
|
||||||
Dim swErrors As Integer
|
Dim swErrors As Integer
|
||||||
Dim swWarnings As Integer
|
Dim swWarnings As Integer
|
||||||
|
|
|
||||||
|
|
@ -58,9 +58,20 @@ Public Class Model_3D_Fill
|
||||||
Check_Interference()
|
Check_Interference()
|
||||||
Recess_Indent()
|
Recess_Indent()
|
||||||
Delete_Obsolete()
|
Delete_Obsolete()
|
||||||
|
|
||||||
|
Save_Assembly()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Shared Sub Save_Assembly()
|
||||||
|
Dim swApp As SldWorks.SldWorks
|
||||||
|
swApp = CType(System.Runtime.InteropServices.Marshal.GetActiveObject("SldWorks.Application"), SldWorks.SldWorks)
|
||||||
|
|
||||||
|
Dim status As Boolean
|
||||||
|
|
||||||
|
Dim Assebmly = swApp.ActiveDoc()
|
||||||
|
status = Assebmly.SaveAs3(Settings.folderPaths("object_" & Data.objectNum & "_models3D_gratings_sw") & "\gratings_assembly.SLDASM", 0, 4)
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Shared Sub Inst_Recesses(parentID As Integer, gratingParameters As DataRow, recessDR As DataRow)
|
Private Shared Sub Inst_Recesses(parentID As Integer, gratingParameters As DataRow, recessDR As DataRow)
|
||||||
Dim inst_ As Integer
|
Dim inst_ As Integer
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 1.6 KiB |