VB.NET二次开发SOLIDWORKS代码
Fori=1ToInt(coy_LXCG_KS)q=iswDoc=swApp.OpenDoc4("F:\课题程序研究\conveyor_LXTSJ\conveyor_LX...
For i = 1 To Int(coy_LXCG_KS)
q = i
swDoc = swApp.OpenDoc4("F:\课题程序研究\conveyor_LXTSJ\conveyor_LXTSJ\SW\" & coy_id_ZG & "-a.SLDPRT", 1, 0, "", longstatus)
swDoc.SaveAs2("F:\课题程序研究\conveyor_LXTSJ\conveyor_LXTSJ\SW\NewGJ\" & coy_id_ZG & "-a.SLDPRT", 0, False, False)
swDoc.Extension.SelectByID2("实体-移动/复制2[4]", "SOLIDBODY", -0.2667696241384, 0.01331698404765, 0.0259840544237, False, 1, Nothing, 0)
swDoc.Extension.SelectByID2("实体-移动/复制2[3]", "SOLIDBODY", -0.3038338364582, 0.01331698404765, 0.01328555361005, True, 1, Nothing, 0)
swDoc.Extension.SelectByID2("实体-移动/复制2[2]", "SOLIDBODY", -0.3136671989103, 0.01331698404765, 0.0104374174893, True, 1, Nothing, 0)
swDoc.Extension.SelectByID2("实体-移动/复制2[1]", "SOLIDBODY", 0.3330654854453, -0.01013180333834, 0.004454609480604, True, 1, Nothing, 0)
swDoc.FeatureManager.InsertMoveCopyBody2(0, 0, 0, 0, 0.0151232967145, -0.00262417060941, -0.0009839056258788, 0, (i - 1) * w3, 0, False, 1)
swDoc.EditRebuild()
swDoc.ViewZoomtofit2()
swDoc.Save()
Next
这个语句老是出现未定义实列的问题,有没有高手啊!谢谢了! 展开
q = i
swDoc = swApp.OpenDoc4("F:\课题程序研究\conveyor_LXTSJ\conveyor_LXTSJ\SW\" & coy_id_ZG & "-a.SLDPRT", 1, 0, "", longstatus)
swDoc.SaveAs2("F:\课题程序研究\conveyor_LXTSJ\conveyor_LXTSJ\SW\NewGJ\" & coy_id_ZG & "-a.SLDPRT", 0, False, False)
swDoc.Extension.SelectByID2("实体-移动/复制2[4]", "SOLIDBODY", -0.2667696241384, 0.01331698404765, 0.0259840544237, False, 1, Nothing, 0)
swDoc.Extension.SelectByID2("实体-移动/复制2[3]", "SOLIDBODY", -0.3038338364582, 0.01331698404765, 0.01328555361005, True, 1, Nothing, 0)
swDoc.Extension.SelectByID2("实体-移动/复制2[2]", "SOLIDBODY", -0.3136671989103, 0.01331698404765, 0.0104374174893, True, 1, Nothing, 0)
swDoc.Extension.SelectByID2("实体-移动/复制2[1]", "SOLIDBODY", 0.3330654854453, -0.01013180333834, 0.004454609480604, True, 1, Nothing, 0)
swDoc.FeatureManager.InsertMoveCopyBody2(0, 0, 0, 0, 0.0151232967145, -0.00262417060941, -0.0009839056258788, 0, (i - 1) * w3, 0, False, 1)
swDoc.EditRebuild()
swDoc.ViewZoomtofit2()
swDoc.Save()
Next
这个语句老是出现未定义实列的问题,有没有高手啊!谢谢了! 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询