Check out the Self-Paced Guide “My First Plug-in” presented by the ADN Revit Team
http://www.autodesk.com/myfirstrevitplugin
Note on 5/11/2018: My First Plug-in is being migrated to Knowledge Base (similar to this forum). Right now, the marketing URL is not working. In a mean time, you can access here:
https://knowledge.autodesk.com/community/collection/my-first-autodesk-revit-plug
Still work in progress. Working on updating all the links, to the latest three releases, etc.
Are you an Autodesk Revit power user with an interest in becoming even more productive? Would you like to automate or extend the capabilities of Revit, but are new to computer programming? If so, then this guide is designed for you.
“My First Plug-in” is a self-paced tutorial guide for a smooth introduction into the programming world. This is a “one-stop shop” learning path for users who know Autodesk products but are absolutely new to programming and are thinking about taking the plunge. In this guide, you will be working with the Autodesk Revit .NET API and the C# programming language. The supported product version is Autodesk Revit Architecture 2011 and succeeding versions.
There are many resources available on the web for you to learn about the Autodesk Revit API (Application Programming Interface), however, these resources tend to be designed for people who already know programming. This guide is different: it assumes no previous programming knowledge and yet helps you build your first plug-in quickly, without swamping you with details. You’ll have a working application within an hour of starting this material, irrespective of your current level of programming expertise.
The guide will start by reviewing the benefits of customizing Autodesk software before progressing onto lessons covering the use of the Autodesk Revit API. The lessons will start by building a working plug-in before covering more detailed explanations of the underlying principles and further developing the application’s functionality.
Product: Autodesk Revit 2011 or higher
Programming Language: C#
Application Programming Interface (API): Revit .NET API
If you have any feedback on this new guide let us know at myfirstplugin@autodesk.com
Hi m.touchard,
Which link are you having a problem? I just tried with this (which is the topic of this post), it works for me now.
http://www.autodesk.com/myfirstrevitplugin
Maybe there was a temporary problem with the internet or a server. Sometimes the browser may have a problem. I sometimes find refreshing the browser solves a problem.
Hey !
After checking again it seems the problem come from Google Chrome which display :
|
The link works very well with Edge even if the redirect URL is the same.
Thanks for the reply!
Hi Mikako,
Just to let you know that the link to 'Message Listing' at the base and top of this page incorrectly point to http://forums.autodesk.com/t5/revit-api-forum/bd-p/160/page/11 (in IE11).
Cheers,
Matt
Hi Matt,
Just tested with IE11. (Mine says Version: 11.0.9600.17843IS). Both brings to:
http://forums.autodesk.com/t5/revit-api-forum/bd-p/160
which is correct. Tooltip when you hover on the link also shows the same one.
Maybe it was temporary or somebody else reported and fixed.
Thank you for quickly reporting when you noticed, though.
I am stuck on adding reference to Visual Studio. Here is the error message after I try to add RevitAPIUI as reference.
I couldn't find any answers. Could anyone help me?
Thanks.
Did you choose the "Class Library (.NET Framework)" when you create your project ?
Besides in the "Build" properties, make sure you have chosen a compatible framework with Revit (I think the Framework 4.5.2 is ok)
Kind Regards,
GM
Hi @Anonymous,
Did you add the following references :
-RevitAPI.dll
-RevitAPIUI.dll
It seems that a reference is missing.
I've tried with these references and it worked for me.
If you still have issues, please provide more information.
Cheers,
GM
Hi @Anonymous
About what I see in your screenshot it seems that it's working : You've put a PickObject in your code whose description is "Please select a group" and I see in the bottom left corner that description"Please select a group". So I assume that your code went through there. I want you to know that the PickObject method don't display a window to the user but only that message in the corner. So for me everything seems good.
Cheers,
GM
Hi @Anonymous
You are right. The plug-in works well. My problem is that the debugging doesn't work well. When I hit start debugging, the toggled line is supposed to turn yellow according to the instruction. But in my situation, it doesn't, which means I could not debug the code line by line.
http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=20132893
Thanks,
@Anonymous, in the properties of debugging, did you set the configuration to "(Debug) active" ?
If so, I don't know how to fix it sorry...
PS : Sorry the attached picture is in french but I'm sure you will understand it cause it's very similar to English
Regards,
GM
Hi @Anonymous
I believe this it the problem. Thank you very much. But the weird thing is that those options are grey out here.
@Anonymous,
Yeah, it seems that it could cause an issue when debugging
I don't know how to fix it especially because you don't have the same version of visual studio I think.
Take a look at this video which explains how to set properly the Visual Studio configuration in order to work with Revit :
https://www.youtube.com/watch?v=C0mNU2bEUSs
When I start with Revit API I've done every project thanks to this video.
Regards,
GM
Hi, I'm getting problems when typing the codes of placing a new group in each of the selected rooms. The guide shows two methods and both have errors. I'm using Revit 2017 and Visual Studio 2015.
Can't find what you're looking for? Ask the community or share your knowledge.