Hi ,
I am not sure if you correctly understand the goal here but will comment so far I understood it.
- if you have a model which is not loaded in session , there is no funciton in Toolkit to found out which models are depended to it.
-the dependencies is mostly in one direction from top -> subassemblies - and components.
- so when you load a component in session( let sey using ProMdlLoad or ProMdlRetrieve) - Creo parametric will try to load all dependend components which are required for the display in Creo Parametric.
-When you have a model in session you can use the function ProMdlDependenciesDataList()
The function ProMdlDependenciesDataList() provides an array of ProMdl handles to the models in memory upon which a specified model depends. One model depends on another if its contents reference that model in some way. For example, an assembly depends on the models that form its components, and a drawing model depends on the solid models contained in it. Sometimes, two models can be mutually dependent, such as when a model feature
references a geometry item in a parent assembly. Clean the dependencies in the
database using the function ProMdlDependenciesCleanup() to get an accurate list of dependencies for an object in the Creo Parametric workspace.
Use the function ProMdlDependenciesCleanup() to clean the dependencies for an object in the Creo Parametric workspace.
- you can use the function ProMdlErase()
• ProMdlEraseNotDisplayed()
• ProMdlEraseAll()
To erase model from session.
So for example you can do some test by loading a model then analyses it with the function ProMdlDependenciesDataList() and write the information about the dependencies to a file and remove all files from session. For the next time you will have already outside the session an information about a model and its dependencies.