IExternalCommand could not be found
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I've decided to have another go at building a ribbon for Revit to run some of my C# commands.
The Revit SDK 2017 has a Ribbon example, which I've decided to try to use.
When I open the solution in Visual Studio I get loads of compile errors, the first one being:
The type or namespace name 'IExternalCommand' could not be found (are you missing a using directive or an assembly reference.
I'm using Revit 2017. I've added RevitAPI and RevitAPIUI into the solutions references, and the code has the following using directives at the beginning (these were part of the original Autodesk ribbon sample code - I've not changed anything):
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.Revit;
using Autodesk.Revit.DB;
using System.Diagnostics;
using System.IO;
using System.Collections;
using Autodesk.Revit.UI;
using Autodesk.Revit.ApplicationServices;
using Autodesk.Revit.Attributes;
using System.Windows.Media.Imaging;
I've also changed the .net framework to 4.5.2 - I understand that Revit 2017 uses this.
But still the build errors - Am I missing something?
Thanks.