有没有办法让catscript / catvbs / catvba访问CATPart的所有Pointed Documents?
我需要检索所有Pointed Documents文件路径的列表(类似于交互式用户使用菜单View - > Edit Links - > Pointed Documents选项卡获得的内容)
CATIA V5 Automation似乎仅为CATDrawings公开此类API。对于每个 DrawingView 对象,您可以获得指向文档:
PointedDocFullPath = MyDrawingView.GenerativeBehavior.Document.Parent.FullName
但,如何获得 CATPart 链接?
答案 0 :(得分:1)
尝试CAIEngine和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()
祝你好运