CATIA V5 VBA:获取CATPart链接文档 [英] CATIA V5 VBA: get CATPart linked documents
问题描述
有没有办法让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屋!