Catia零件设计教程:CatiaV5VBA:获取所选零件中的零件号

关于Catia零件设计教程的问题,在partnumber中经常遇到, 我想在我的设计中创建一个宏 get properties of part & amp;product。我需要获取 partnumber of part。当我在 Tree 中选择或用“Product selection”选择时。它使用相同的代码:

我想在我的设计中创建一个宏 get properties of part & amp;product。我需要获取 partnumber of part。当我在 Tree 中选择或用“Product selection”选择时。它使用相同的代码:

 Dim objSel
 Set objSel = Catia.ActiveDocument.Selection
 parNo= objSel.Item(1).Value.PartNumber

但这并不方便。我想在选择任何对象 (Edge,plane,suce...) 时获取 PartNumber。无论如何,我怎样才能得到它?

Thanks & amp;Best regards,

1

如果要在程序集中进行选择,则可以使用Leafproduct而不是Value

parNo = objSel.Item(1).LeafProduct.PartNumber

本站系公益性非盈利分享网址,本文来自用户投稿,不代表码文网立场,如若转载,请注明出处

(421)
Cozy ard:ARDUnix命令帮助-回答是-自动取消域加入/重新加入
上一篇
Python项目案例:关于特定项目的案例陈述(statementing)
下一篇

相关推荐

发表评论

登录 后才能评论

评论列表(40条)