amender carapace said:
and could not find the dependency API you mentioned
Why you want to use DependencyAPI? It is very low API, where it is not expected it is used by 3rd party developer (even when it is possible). There are other tools / options / classes available, but what is the best can be discussed only when required functionality is known.
Refers to this reply from Jan. What are the currently used api and classes to associate the elements?
amender carapace said:What are the currently used api and classes to associate the elements?
The problem is that you do not bother to answer my question why do you want to associate element :-(
There are different ways, how to "associate" elements (to establish an association), providing different set of features.
amender carapace said:and could not find dependency API
Did you try to search SDK documentation for "dependency" keyword?
I received many results, including Element Dependencies chapter, with further links to several C APIs and DependencyManager, but the search also found Relationship Manager chapter (which is probably recommended place, where to start, because it provides more complex functionality than low level DependencyManager).
amender carapace said:to associate one element with another in different DGN model under same file?
In the context of the same DGN file, to remember a combination of element ID and model ID is enough.
amender carapace said:[MSCE U8 c++]
What is the reason so old MicroStation version is used? Update 8 was released 3 years ago and from user's perspective, anything older than let's say Update 14 is extremely buggy and slow. The latest Update 16.2 looks quite fine and last few releases bring also substantial performance optimization.
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
to have element A be associated to element B so that if I delete B, A would be deleted. if I altered B's EC property, A would be altered in shape accordingly.
In more concise wording, I would like to achieve similar function like Graphic Group Relationship of OBD in MS.
Jan Šlegr said:The search also found Relationship Manager chapter, which is probably recommended place
If you had searched this Forum for Relationship Manager, you would have found this answer from Paul Chater...
It's very rare that an application would need the sophistication and complexity associated with the RelationshipManager. The animator in Microstation is the only subsystem which requires it, for all the other subsystems the DependencyManager API's are more than sufficient
amender carapace said:DependencyAPI is very low API, where it is not expected it is used by 3rd party developer
Why shouldn't it be used by a third-party developer? It's a published API, documented and with header files. Where does Bentley Systems advise us not to use it?
I agree that it's low-level, and could be improved using object-oriented refactoring. The same is true of other parts of the SDK.
amender carapace said:to have element A be associated to element B so that if I delete B, A would be deleted
The Dependency Manager provides exactly that capability. Here's an example.
Regards, Jon Summers LA Solutions
Answer Verified By: amender carapace
Jon Summers said:you would have found this answer from Paul Chater...
Thanks for the link!
I vaguely remember this discussion, but did not search for it.
Thank you Jon, I tried to bmake the example you mentioned and it return error with la.h missing. I cannot find such file from the downloaded file nor within my computer.
amender carapace said:I tried to bmake the example you mentioned and it return error with la.h missing
Oops! It's a file we use everywhere, not particular to any one project. See if this helps: I've added la.h to the ZIP C++ files...BoxDependency.zip