PDA

View Full Version : API


Bob the Bimmer
2006-12-18, 04:31 PM
I am getting some requests from the 'higher-ups' to manipulate Revit beyond the capabilities of your average usage. I've been looking into possibly jumping into the API-pool with both feet.

Other than the RevitAPI.chm file I found in my program directory, does anyone have any pointers on how to get started? Is there any "API for Dummies" documentation available? Do I have to learn VB or C++ first?

Scott Davis
2006-12-18, 04:49 PM
You will need to Join the ADN (Autodesk Developers Network) for support in using the API beyond just using the Help file.

greg.mcdowell
2006-12-18, 04:50 PM
And yes, you'll need to learn some programming. I think VB.net is the "easier" of the options.

robert.manna
2006-12-18, 05:29 PM
Care to be a little more specific about the requests? There was a recent dicussion under the API forum about what language a new coder should learn. Some really great guys hang out in the API forum too. ADN is a nicechunk of $$$, just warnining, you do get a lot of good stuff/access for your yearly investment though. There is quite a bit that can be done with Revit to achive a number of results without the use of API. I'm in full support of API development, but as somone recently pointed out to me, my firm given its size is in position where can afford/absorb software development costs.

-R

Chirag Mistry
2006-12-18, 07:06 PM
There were two classes during AU this year, if you have subscription check the class handouts and examples. One was by Danny Polkinhorn, not sure about the other one.

Hope this helps

Bob the Bimmer
2006-12-18, 07:24 PM
Thanks for all the pointers, people. 'Looks like I need a raise!

GuyR
2006-12-18, 08:33 PM
Is there any "API for Dummies" documentation available? Do I have to learn VB or C++ first?

If you have c++ experience go for it. If not then c++ isn't jumping in the deep end it's more like jumping off a bridge ;-)

To use the API you need to understand and be comfortable with the following:

1.. A .NET language, either c# or VB.NET. Personally I find C# more verbose and easier to read and more OO. Get a good book for reference.
2.. You need to understand the basics of Object oriented programming.
3.. For graphical programming learn the basics of winForms and databinding.
4.. Get familiar with the API.

Regarding resources:

Download the .NET 2.0 SDK this includes a lot of documentation and examples.

Start with MS C# or VB Express or Sharpdevelop 2.0. MS Express also have tutorial videos for beginners. These might help.

On your 9.1 CD or on the Revit website there is a zip of examples. Most are in c# but these can be converted to VB using your IDE or online.

Start with compiling the examples and go from there.

Guy

Bob the Bimmer
2007-01-12, 07:50 PM
Care to be a little more specific about the requests?
Without going into too much detail (I'm not allowed to), we are trying to have initial data shape the building rather than the shape of the building yielding data. There is only so much I have been able to do with parameters and visibility settings...

emile.kfouri
2007-02-11, 04:39 AM
On your Revit CD you will find a file called SDK.ZIP. In that file you will find a lot of documentation and sample code. It will get you started and will get you quite far. ADN is really great and very helpful but it may not be for everyone. If you just want to see what you can do with the API the SDK is the place to start and you all have it on your CDs.

Enjoy!
Emile