I'm working on some validation code. I want to look for all the valves in a design, then determine what pipes they are connected to, and compare their diameters. Seems straightforward and deterministic. I have figured out how to loop through a design, process only valves, and look at their connectivity; but all I see are the number of connections. How can I dicover the features that are attached to the valve?
Code snippets are wonderful, but I will gladly accept some heuristic advice.
In the mvba included with the core bentley utility suite (lke xfmStdElecLib), look for methods called GetConnectedFeatures and GetAttachedFeatures.
Both should take an xfm.feature object as an input and return a collection that you can iterate.