Using Statements

Here is the set of “using” statements that I currently have in my macros file

using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Collections.Generic;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.Architecture;
using Autodesk.Revit.DB.Events;
using Autodesk.Revit.UI.Events;
using Autodesk.Revit.UI;
using Autodesk.Revit.UI.Selection;
using Autodesk.Revit.ApplicationServices;

For the output to Excel post I also used

using Microsoft.Office.Interop.Excel;

But as I noted in that post, that namespace and Autodesk.Revit.DB both have classes named Line and Parameter, so to avoid that I have commented out the Excel using statement and the macro that does the Excel output.

If you are missing “using” statements, the error you will see is like this one:

The type or namespace name ‘Room’ could not be found (are you missing a using directive or an assembly reference?) (CS0246) –

3 thoughts on “Using Statements

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s