skurihin
2010-06-22, 10:02 AM
as = amiGetContainingComp(pGeomKey, pLeafCompKey);
as = amiGetContainingComp(pLeafCompKey, pContCompKey);
as = amiGetCompDef(pContCompKey, pTargetCompDefKey);
as = amiGetCompOwner(pLeafCompKey, pTestCompDefKey);
as = amiAreKeysEquivalent(pTestCompDefKey, pTargetCompDefKey, bRetValue);
if(bRetValue==Adesk::kFalse){
as = amiGetCompDefName(pTargetCompDefKey, pTargetCompDefName, Adesk::kFalse);
as = amiGetCompDefName(pTestCompDefKey, pTestCompDefName, Adesk::kFalse);
acutPrintf(_T("\nKeys Are: %s, %s"), pTargetCompDefName, pTestCompDefName);}
as = amiIsCompDefLeafNode(pTestCompDefKey, bRetValue0);
as = amiIsCompDefLeafNode(pTargetCompDefKey, bRetValue);
if(bRetValue!=bRetValue0) acutPrintf(_T("\nDef Keys differ in type: %d, %d"), bRetValue0, bRetValue);
By running above piece of code one will very easily see that pTargetCompDefKey and pTestCompDefKey constructed by appropriate APIs are NOT equivalent, although they refer to the same object. The difference is “type mismatch”: pTargetCompDefKey is leaf-node definition, while pTestCompDefKey is NOT! I don’t know if it was AutoDesk intent, but you should take into account this “glitch”.
as = amiGetContainingComp(pLeafCompKey, pContCompKey);
as = amiGetCompDef(pContCompKey, pTargetCompDefKey);
as = amiGetCompOwner(pLeafCompKey, pTestCompDefKey);
as = amiAreKeysEquivalent(pTestCompDefKey, pTargetCompDefKey, bRetValue);
if(bRetValue==Adesk::kFalse){
as = amiGetCompDefName(pTargetCompDefKey, pTargetCompDefName, Adesk::kFalse);
as = amiGetCompDefName(pTestCompDefKey, pTestCompDefName, Adesk::kFalse);
acutPrintf(_T("\nKeys Are: %s, %s"), pTargetCompDefName, pTestCompDefName);}
as = amiIsCompDefLeafNode(pTestCompDefKey, bRetValue0);
as = amiIsCompDefLeafNode(pTargetCompDefKey, bRetValue);
if(bRetValue!=bRetValue0) acutPrintf(_T("\nDef Keys differ in type: %d, %d"), bRetValue0, bRetValue);
By running above piece of code one will very easily see that pTargetCompDefKey and pTestCompDefKey constructed by appropriate APIs are NOT equivalent, although they refer to the same object. The difference is “type mismatch”: pTargetCompDefKey is leaf-node definition, while pTestCompDefKey is NOT! I don’t know if it was AutoDesk intent, but you should take into account this “glitch”.