I have a simple c# class using the Revit API but I’m confused how do I setup the class (.dll) for Dynamo to use.
I’ve had success importing a package (.dll) that isn’t using the Revit API, however, I would really like to use the Revit API. Does anyone have a template for c# class using the Revit API to be used in Dynamo? or an example of how you put together a dyn and .dll to work together to edit Revit Elements?
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.Architecture;
using System.Collections.Generic;
namespace SOM.RevitTools.TopoBuildingPad
{
class BuildingPadEdge
{
public void BuildingPad_edge(IList<CurveLoop> profileloops, Document doc)
{
FilteredElementCollector buildingPad = new FilteredElementCollector(doc).OfClass(typeof(BuildingPad));
BuildingPad b = null;
foreach (BuildingPad pad in buildingPad)
{
b = pad;
}
ElementId activeViewId = doc.ActiveView.Id;
Transaction t = new Transaction(doc, "trans");
t.Start();
b.SetBoundary(profileloops);
t.Commit();
}
}
}