revit-api

Placing a library part using the Revit Api

I am using the revit api to import a family symbol. The code below is working however it loads the family into revit, and then you have to manually drag it from the familys tree or insert using the relevant family tool. Document document = commandData.Application.ActiveDocument; document.LoadFamilySymbol(fileName, name, out gotSymbol); ...

How to generate a compiler error based on an attribute being missing in C#?

I create a number of add-ins for the Revit Structure API. Each tool has to habe a class which implements the interface IExternalCommand. In the latest version of Revit, for your tool to work you need to have two attributes on the class that implements that interface: [Regeneration(RegenerationOption.Manual)] [Transaction(TransactionMo...

Remote Debugging in Visual Studio can't find the symbols?

I've been scouring the net trying to find an answer to this question, but all other suggestions don't work. I have a C# .net 3.5 dll that is an add-in to another program. The program calls the dll when the user presses a certain button. My tool is having an error that is related to the specific setup of the users computer (unrepeatable ...

Revit MEP 2011 C# iterate through all equipment

I want to iterate through all the equipment in a drawing and get the name of the equipment. Here is what I have: UIApplication uiapp = commandData.Application; UIDocument uidoc = uiapp.ActiveUIDocument; Application app = uiapp.Application; Document doc = uidoc.Document; // get all PanelScheduleV...

How to iterate through views in Revit?

Hello, I am kinda new to Revit both the software and the programming. I think the whole API and proprieties are real non-instinctive mazes. I searched for quite a time, I found out how to get the current view or how to add a view, but I am unable to get the list of all the views in a project. Anybody could point me out which API are nee...