Message 1 of 4
Conduit API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to get the conduit type of the last used conduit , but it doesnt work
ConduitType activeConduitType = null;
ElementId defaultTypeId =
doc.GetDefaultElementTypeId(ElementTypeGroup.ConduitType);
if (defaultTypeId != ElementId.InvalidElementId)
{
activeConduitType = doc.GetElement(defaultTypeId) as ConduitType;
}
if (activeConduitType == null)
{
activeConduitType = new FilteredElementCollector(doc)
.OfClass(typeof(ConduitType))
.Cast<ConduitType>()
.FirstOrDefault();
}
var conduitSizeSettings = ConduitSizeSettings.GetConduitSizeSettings(doc);
var standardName = activeConduitType.get_Parameter(BuiltInParameter.CONDUIT_STANDARD_TYPE_PARAM).AsValueString();