CATIA V5 VBA:获取CATPart链接文档 [英] CATIA V5 VBA: get CATPart linked documents

查看:1934
本文介绍了CATIA V5 VBA:获取CATPart链接文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法让catscript / catvbs / catvba访问CATPart的所有Pointed Documents?

Is there a way for a catscript/catvbs/catvba to access all the Pointed Documents of a CATPart?

我需要检索所有Pointed Documents的列表文件路径(类似于交互式用户使用菜单查看 - >编辑链接 - >指向文档选项卡获得的内容)

I need to retrieve a list of all the Pointed Documents filepaths (similarly to what an interactive user gets with the menu View-->Edit Links-->Pointed Documents tab)

CATIA V5自动化似乎仅公开此类API CATDrawings。对于每个 DrawingView 对象,您可以获得指向文档:

CATIA V5 Automation seems to expose such APIs only for CATDrawings. For each DrawingView object you can get the Pointed Document with:

PointedDocFullPath = MyDrawingView.GenerativeBehavior.Document.Parent.FullName

但是,我怎样才能获得 CATPart 链接?

But, how can I get CATPart links?

推荐答案

尝试CAIEngine和stiDbItems:

Try CAIEngine and stiDbItems:

stiEngine = catia.GetItem("CAIEngine")    
# The GetStiDBItemFromAnyObject() needs a document object as parameter.
stiDbItem = stiEngine.GetStiDBItemFromAnyObject(product.ReferenceProduct.Parent)
stiChildren = stiDbItem.GetChildren()
for i in xrange(1, stiChildren.Count + 1):
  fullPath = stiChildren.Item(i).GetDocumentFullPath()

祝你好运

这篇关于CATIA V5 VBA:获取CATPart链接文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆