I found a way to get all pipe of current plant in OPM SDK's example as follow :
ECInstanceList pipeInstances = DgnUtilities.FindInstancesAndLoadRelated("PIPE", false, "PIPING_COMPONENT_HAS_PORT", true); if (pipeInstances != null && pipeInstances.Count > 0) { foreach (IECInstance pipeInst in pipeInstances) { //do something } }
I could get most EC value in the pipeInst,but i can't get ElementId from it.Does Anyone knows how to get ElementId from it or have an easy way to get all pipe's ElementId?