Пример #1
0
    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);
    }
Пример #2
0
        /// <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());
        }