Hello again Balaji,
thanks for your reply
the following is taken form ObjectARX reference guide
Acad::ErrorStatus getDependentObjects(bool readDependenciesWanted, bool writeDependenciesWanted, AcDbObjectIdArray& objectIds) const;
Description
Gets the AcDbObjects that this action depends on or modifies. The default implementation collects all object on which the action has AcDbAssocDependencies.
and
Acad::ErrorStatus getDependencies(bool readDependenciesWanted, bool writeDependenciesWanted, AcDbObjectIdArray& dependencyIds) const;
Description
Gets AcDbAssocDependencies of this action. The default implementation obtains all dependencies owned by the base action class and selects the ones based on the required read/write type.
Consider the following scenario
an AcDbAssocActionBody has
dependency1 on object1 (read only)
dependency2 on object2 (write only)
dependency3 on object3 (write only)
1. getDependentObjects(false, true, objectIds)
2. getDependencies(false, true, dependencyIds)
shouldn't call 1 return object2 & object3
and call 2 return dependency2 & dependency3
I tried the following
AcDbAssocAction::getActionsDependentOnObject(pObject1, true, false, actionIds);
for each item in the actionIds array I opened the action object and I used pAction->getDependentObjects(false, true, objectIds) as well as pAction->getDependencies(false, true, dependencyIds)
for each dependency in the dependencyIds I got the pDependency->dependentOnObject() objectId.
I noticed that the objectIds that I ended up with 1. getDependentObjects(false, true, objectIds) is empty, and with call 2. getDependencies(false, true, dependencyIds) is object2 & object3 as expected.
Shouldn't call 1 also return the same objects I think that is what the reference guide above suggest. Is it not?
Where am I going wrong?
"Get me all the objects on whom I am dependent" is equivalent of the "GetDependentObjects" statement in your reply suggest to me that the "GetDependentObjects" call returns only the objects that have attached to them read/write or read only dependencies. Is that so? If yes is it not the "depends on or modifies" in the documentation misleading?
Thank again.
Regards
Anastassios