I have created some VBA routines that create wooden beams (brown), steel beams (white) and a third kind of element (blue).
The third ones are copies of steel beams with some additional "production tolerances" - see profile below (the inner profile is the steel beam)
The outer profile is subtracted from the wooden beams (using the Microstation VBA-method "SmartSolid.SolidSubtract").
See below:
The next screenshot shows all three bodies:
The last one shows the result:
Everything is working fine so far.
My question is - is there any chance to associate or link the blue body with the white (steel beam)?
The reason for that question is that I do not want to show the blue body - If the steel beam is deleted then the blue body would remain and nobody would find it ...
My goal would be to remove the blue body when the steel beam is deleted.
Can this be achieved?
Unknown said:Is there any way to associate or link the blue body with the white (steel beam)?
If you were writing MDL, I would suggest using the dependency API. The dependency logic links things such as tags with a host, a dimension with an object, a pattern with a polygon.
However, the dependency logic is not exposed to VBA: there is no VBA dependency API. How about a cell? Or a named group?
Regards, Jon Summers LA Solutions
Answer Verified By: Robert Hook
I search on Microstation Documentation API and could not find the dependency API you mentioned, what key word to use or how could I find it?
Hi,
please respect the best practices and do not re-open 8 years old (!) discussion.
Ask in the new post, explaining clearly what you are looking for, in what context (product, exact version, API).
amender carapace said:I search on Microstation Documentation API
What documentation, for what SDK version?
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.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point