查看单个帖子
旧 2007-06-23, 07:01 PM   #4
yogy
高级会员
 
注册日期: 06-11
帖子: 1527
精华: 15
现金: 6353 标准币
资产: 6353 标准币
yogy 向着好的方向发展
默认 回复: 求助:SolidWork Remove Body Material Property 的API

Sw的操作可以录宏啊!
Dim swApp As Object
Dim Part As Object
Dim SelMgr As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim Feature As Object
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Set SelMgr = Part.SelectionManager
boolstatus = Part.Extension.SelectByID2("Extrude1", "BODYFEATURE", 0, 0, 0, False, 0, Nothing, 0)
Part.SelectedFaceProperties 0, 0, 0, 0, 0, 0, 0, 0, "Extrude1"
boolstatus = Part.EditRebuild3
Part.ClearSelection2 True
End Sub
yogy离线中   回复时引用此帖