link up to revit API

link up to revit API

Anonymous
Not applicable
645 Views
3 Replies
Message 1 of 4

link up to revit API

Anonymous
Not applicable
Hi all,

I'm trying to link up to the Revit 8.1 Api in a C# environment (express edition 2005).
Can anybody tell me wat's wrong with the following code:


using Autodesk.Revit;


namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Autodesk.Revit.Creation.Application revApp = new
Autodesk.Revit.Creation.Application();


}


}



}


thanks for any input,
ruben.
0 Likes
646 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
ruben,
All you can do with the API is build a dll with commands in that will be
called from Revit.

I am currently working with a preview of version 9.0 where it is all
documented in Getting Started .doc, but I am not sure what documents were
available with 8.1. (There is no difference in what you can do with the API
though).

Regards
David

wrote in message news:5112450@discussion.autodesk.com...
Hi all,

I'm trying to link up to the Revit 8.1 Api in a C# environment (express
edition 2005).
Can anybody tell me wat's wrong with the following code:


using Autodesk.Revit;


namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Autodesk.Revit.Creation.Application revApp = new
Autodesk.Revit.Creation.Application();


}


}



}


thanks for any input,
ruben.
0 Likes
Message 3 of 4

Anonymous
Not applicable
Hopefully this is useful: I didn't pay attention to the code in your post (simply b/c I'm a C# code hack and prolly couldn't help you much) but if C# Express 05 is like the other 2005 environments, it won't work with Revit 8.1 or previous. You'll have to wait for 9 for the Revit API to respond to .net 2.0. (unless of course you're using COM and not NET...then I'm double not sure)
0 Likes
Message 4 of 4

Anonymous
Not applicable
Both posters are correct...


1. You can't instantiate Revit from the outside like a COM app - you can only write plugin External Tools accessible from the Tools menu.

2. Revit 8.1 works only with VS 2003. Revit 9, I believe only works with VS2005...
0 Likes