Warning: One or more of the input types are not matching. Couldn’t find a version of SignalAfterBlockage that takes arguments of type (__array,__array,Revit.Elements.Views.AxonometricView,__array)
This the error I am getting for the node I have created. I have double checked the input types… visual studio is giving no error in c# code.
I have tried changing my input to arrays instead of list nut I am still getting the same error
[MultiReturn(new[] { "Signal_loss", "RevitPoints" })]
public static Dictionary<string, object> SignalAfterBlockage(List<Autodesk.DesignScript.Geometry.Point> dynamo_points,List<Revit.Elements.FamilyInstance> devices, Revit.Elements.Views.AxonometricView view, List<Revit.Elements.Element> categories)
{
Document doc = DocumentManager.Instance.CurrentDBDocument;
TransactionManager.Instance.EnsureInTransaction(doc);
List<XYZ> revit_points = dynamo_points.ToXyzs(true);
Autodesk.Revit.DB.View3D revit_view = view.InternalElement as Autodesk.Revit.DB.View3D;
List<List<double>> elems = new List<List<double>>();
List<ElementCategoryFilter> catfilters = new List<ElementCategoryFilter>();
List<ElementFilter> catfilterlist = new List<ElementFilter>();
foreach (Revit.Elements.Element i in categories)
{
Autodesk.Revit.DB.Element cat = i.InternalElement;
Autodesk.Revit.DB.ElementId elementId = cat.Id;
ElementCategoryFilter ecf = new ElementCategoryFilter(elementId);
catfilters.Add(ecf);
catfilterlist.Add((ElementFilter)ecf);
}
this is the initial part of my code
I think it is not properly converting the list of categories from dynamo to revit…as when I converted my input list type to List the code gave error that it cannot convert Revit.Element.Category type to Revit.Element.Element .
it is to not that the InternalElement parameter doesn’t works on Revit.Elements.Category
I have now identified from the object browser that the base class of the category is Object hence the input type will not be Revit.Element.Element
now my question is how should I convert dynamo category to Revit’s category?