public override Form DrillDown() { if (!HasDrillDown) { return(null); } var templateParameterIds = _view.GetTemplateParameterIds() .Select(id => _view.Parameters .Cast <Parameter>() .ToList() .Find(q => q.Id.IntegerValue == id.IntegerValue)) .Where(p => p is not null) .Select(p => new SnoopableWrapper(p.Definition.Name, p)).ToList(); if (templateParameterIds.Count == 0) { return(null); } var form = new ObjectsView(templateParameterIds); return(form); }
/// <summary> /// Gets the ElementIds of the view's parameters that are controlled by a view template. /// </summary> /// <param name="View">A dynamo wrapped View</param> /// <returns name="ElementIds">A list of ElementIds that are controlled by a view template.</returns> public static IList <revitElemId> GetTemplateParameterIds(dynaView View) { revitView rView = (revitView)View.InternalElement; return(rView.GetTemplateParameterIds()); }