PDA

View Full Version : Autocad API Commands



jje
2007-01-31, 05:47 PM
I'm working on using the Revit API, and I'm trying to implement a piece of code from James Vandezande at SOM. There are two classes for importing drawing sheets from Autocad into Revit. Both of them use objects and methods that appear to be from the Autocad API, because VisualStudio does not recognize them and I'm only importing and referencing Autodesk.Revit and RevitAPI.dll.

For instance:

Dim oSheets As New AutoCADSheets
oSheets.SelectSheetSet()

is not recognized because there is no class available called "AutoCADSheets." Where are the autocad classes defined?

GuyR
2007-02-01, 01:36 AM
Sounds like some AU code. You need the .NET assembly for AutoCAD from the SDK.

HTH,

Guy

Danny Polkinhorn
2007-02-01, 02:18 AM
I think the error you're getting is because it can't find or load AutoCAD 2007 (which is required for those code samples to work). Do you have AutoCAD 2007 on your machine?

jje
2007-02-01, 02:26 PM
Thanks for the response.

That sounds about right. I have Autocad2007. How do I let the Revit API or VB Express know that I have Autocad 2007?

Or if the previous post is corret, how do I get the .NET assembly for Autocad from the SDK?

Danny Polkinhorn
2007-02-01, 07:33 PM
Go to the Properties of the ImportSheets project and click on the references tab. Anything have a location of "the system cannot find the reference specified"?

Also, can you be exact about when the error message occurs and what it actually says? Sorry, it could be just about anything, and I need a little more information to help you. Maybe a screen shot of the error would help.