Added extrude feature and save part document in SW
This commit is contained in:
parent
1ee291a02c
commit
cb144d9128
|
|
@ -1,6 +1,6 @@
|
|||
Imports XCCLibrary
|
||||
'Imports SolidWorks.Interop.sldworks
|
||||
'Imports SolidWorks.Interop.swconst
|
||||
Imports SolidWorks.Interop.sldworks
|
||||
Imports SolidWorks.Interop.swconst
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports System
|
||||
Imports SldWorks
|
||||
|
|
@ -54,7 +54,33 @@ Public Class Program
|
|||
skLine = swSkMgr.CreateLine(pX1, pY1, 0, pX2, pY2, 0)
|
||||
Next
|
||||
|
||||
'Rename sketch?
|
||||
|
||||
swSkMgr.InsertSketch(True)
|
||||
|
||||
|
||||
Dim status As Boolean
|
||||
Dim swModelDocExtension As ModelDocExtension
|
||||
|
||||
swModelDocExtension = Model.Extension
|
||||
status = swModelDocExtension.SelectByID2("Sketch1", "SKETCH", 0, 0, 0, False, 0, Nothing, 0)
|
||||
|
||||
Dim swFeatureMgr As FeatureManager
|
||||
swFeatureMgr = Model.FeatureManager
|
||||
Dim swFeature As Feature
|
||||
|
||||
swFeature = swFeatureMgr.FeatureExtrusion3(True, False, False, 0, 0, 0.001, 0, False, False, False, False, 0, 0, False, False, False, False, True, True, True, 0, 0, False)
|
||||
|
||||
|
||||
Dim randInt As Integer
|
||||
randInt = CInt(Math.Ceiling(Rnd() * 1000)) + 1 'For debug only
|
||||
|
||||
Dim iPart As PartDoc
|
||||
iPart = swApp.ActiveDoc
|
||||
Dim newName As String
|
||||
newName = "C:\Users\Anton\Documents\Exjobb\Temp" & "\TESTPART" & randInt & ".SLDPRT"
|
||||
longstatus = Part.SaveAs3(newName, 0, 0)
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
|
|
|||
Loading…
Reference in New Issue