Imports SolidWorks.Interop.sldworks
Imports SolidWorks.Interop.swconst
Imports System.Runtime.InteropServices
Imports System
Imports System.Diagnostics
Partial Class SolidWorksMacro
Dim swModel As ModelDoc2
Dim selMgr As SelectionMgr
Dim swPart As PartDoc
Dim mirrorFeature As Feature
Dim myFeature As Feature
Dim resultPart As ModelDoc2
Dim mirrorFeatData As MirrorPartFeatureData
Dim refPlane As RefPlane
Dim facePlane As Face2
Dim mirrorOptions As Integer
Dim faceType As Integer
Dim selType As swSelectType_e
Dim message As String
Sub main()
swModel = swApp.ActiveDoc
If swModel Is Nothing Then Exit Sub
If swModel.GetType <> swDocumentTypes_e.swDocPART Then Exit Sub
selMgr = swModel.SelectionManager
If selMgr.GetSelectedObjectCount2(-1) = 0 Then Exit Sub
selType = selMgr.GetSelectedObjectType3(1, -1)
If Not (selType = swSelectType_e.swSelDATUMPLANES Or selType = swSelectType_e.swSelFACES) Then Exit Sub
swPart = swModel
.............字数限制,省略
End If
End Sub
Public swApp As SldWorks
End Class 作者: 东边wo 时间: 2014-11-21 09:30
为什么图片无法显示出来{:soso_e105:}