查看单个帖子
旧 2007-06-26, 08:07 AM   #5
hello098
初级会员
 
注册日期: 07-06
帖子: 7
精华: 0
现金: 20 标准币
资产: 20 标准币
hello098 向着好的方向发展
默认 回复: 求助:SolidWork Remove Body Material Property 的API

我说的是把删除Body颜色的操作录宏,下面是我录的宏代码,录不到删除Body颜色的API。多次麻烦您,实在是很感谢!!
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", "SOLIDBODY", 0, 0, 0, False, 0, Nothing, 0)
boolstatus = Part.Extension.SelectByID2("", "FACE", 0.01980884773644, 0.007411491703351, 0.00590052665541, False, 0, Nothing, 0)
Part.ClearSelection2 True
End Sub
hello098离线中   回复时引用此帖