iCAx开思网
标题:
有懂的帮忙解答下啊,感谢啊
[打印本页]
作者:
newfaith2011
时间:
2019-8-14 20:44
标题:
有懂的帮忙解答下啊,感谢啊
我想把切割清单下的每个清单下的第一个实体单独插入到新零件啊,并输出为文件名-1,-2,-3,以此类推。查找了不少资料,还是搞不定啊,请求帮助啊,我定义了swbody(0)为切割清单下的第一个实体,如何插入到新零件,并保存啊。下面是我写的代码,名称可以用,如果我把有些引号去掉,如果我再加个if,再输出的也不是我想要的东西。请求帮助啊。swbody.save怎么用啊
While Not swFeat Is Nothing
FeatType = swFeat.Name
FeatTypeName = swFeat.GetTypeName2
'Debug.Print " " & FeatType & " [" & FeatTypeName & "]"
If FeatTypeName = "CutListFolder" Then
Set swBodyFolder = swFeat.GetSpecificFeature2
swBodyFolder.SetAutomaticCutList True
swBodyFolder.SetAutomaticUpdate True
Bodies = swBodyFolder.GetBodies
b = b + 1
sSaveName = dwgPath & filename & "-" & b & ".sldprt"
Debug.Print sSaveName
Set swBody = Bodies(0)
c = swBody.Name
'Debug.Print c
' Features = swBody.GetFeatures
' Features(0).Select2 False, 0
'swModel.SaveToFile3 sSaveName, 1, swCutListTransferOptions_CutListProperties, False, "", longstatus, longWarnings
boolstatus = swModel.SaveToFile3(sSaveName, 1, swCutListTransferOptions_CutListProperties, False, "", longstatus, longWarnings)
End If
Set swFeat = swFeat.GetNextFeature
Wend
作者:
newfaith2011
时间:
2019-8-15 17:11
本帖最后由 newfaith2011 于 2019-8-15 17:13 编辑
作者:
newfaith2011
时间:
2019-8-15 17:11
帮帮忙啊
欢迎光临 iCAx开思网 (https://www.icax.org/)
Powered by Discuz! X3.3