谢谢各位!作者: bright1206 时间: 2005-3-12 09:41
我也遇到这个问题啊,等待各位高手的帮忙。谢谢。作者: bright1206 时间: 2005-3-17 10:06
怎么没人解答吗?作者: xyzhu 时间: 2005-3-17 20:52
I found the solution:
first, you should go to Tools/Options/Infrastructure/PartInfrastructure, in Tab General, in the first block "external reference", select the first checkbox.
Code:
CATIPrtPart_var spPart(spSpecOnPart); // you get a part
CATListValCATISpecObject_var spBodies = spPart->GetImportedBodies();
int size = spBodies.Size();
CATUnicodeString extRefs;
for(int i=1; i<=size; i++)
{
CATIMechanicalImport_var spImport(spBodies);
CATISpecObject_var spOrig = spImport->GetSelectedFeatureInSourceProduct();
CATIAlias_var spAlias(spOrig);
CATUnicodeString strAlias = spAlias->GetAlias();
extRefs += strAlias + ", ";
}
With CATIPrtPart::GetImportedBodies() you get the body refernces in the same part, and with CATIMechanicalImport::GetSelectedFeatureInSourceProduct() you get the original ones.
Does anybody know, how I can get the mapping of a feature and the external reference, which this feature is using (in the same part)? I mean, I have many features and many external references in a part, how can I find out, which feature uses which external reference? Any idea?
Thank you!作者: hick 时间: 2005-3-18 14:53
可以参考 powercopy
建议而已,对不对不知道作者: acoka 时间: 2005-5-24 15:58
很遗憾地告诉你
CATIMechanicalImport在V5R15GA里出问题了,DS说给个代替的interface,但要等到sp2作者: acoka 时间: 2005-5-24 16:18
和powercopy应该不同
返回的CATBehaviorSpecs的内容只能是同个part里的spec, 参照的linker也可以的
如果你这这时候用鼠标点了其他part的东西,powercopy命令的FeatureImportAgent会替你做个external reference,然后把它做为输入作者: acoka 时间: 2005-5-24 16:33
Does anybody know, how I can get the mapping of a feature and the external reference, which this feature is using (in the same part)? I mean, I have many features and many external references in a part, how can I find out, which feature uses which external reference? Any idea?
Thank you!