|
马上注册,结交更多同行朋友,交流,分享,学习。
您需要 登录 才可以下载或查看,没有帐号?注册
x
我想把切割清单下的每个清单下的第一个实体单独插入到新零件啊,并输出为文件名-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 |
|