API, Visual Studio, getting started

API, Visual Studio, getting started

GTisRuleX
Advocate Advocate
1,893 Views
7 Replies
Message 1 of 8

API, Visual Studio, getting started

GTisRuleX
Advocate
Advocate

So I'm in the very early stages of learning Visual Studio, C##, and getting into creating my own addins and menus for Revit.  I've been following the "My First Plugin" guide from Autodesk, and a few other 3rd party sites figure this stuff out.  Right away I've run into version differences in Visual Studio, but been able to bounce my way thru it well enough.

 

Some of my struggles though have been simply getting started.  Right off the bat I get the "Unknown Publisher" warning once my addin is in place.  Reading on that, I need to be a Registered Developer with Autodesk to get a DeveloperID.

 

How do I do this?  I've looked at the ADN, and don't see any "getting started", or even something hinting toward getting my own DeveloperID.

 

Then I ran into a duplicate GUID.  This took me nearly 5 hours of googling to determine how to create my own GUID (guidgen.exe) which was really easy once I found an answer.  (Thank you Jeremy Tammik, "The building coder" for your BLOG on the subject.)

 

I can't think I'm the only person that's started coding, and lost in the beginning like me.

 

0 Likes
Accepted solutions (1)
1,894 Views
7 Replies
Replies (7)
Message 2 of 8

stever66
Advisor
Advisor

Yes, its a really steep learning curve.  

 

To get rid of the unknown publisher error, I believe you need to have your add-in signed by a 3rd party.  I believe that means paying a fee.

 

Try searching the API forum for "signing" or something similar.  here is an example:

https://forums.autodesk.com/t5/autocad-civil-3d-customization/dll-digitally-signed/m-p/6789897/highl...

 

Jeremy is a great help.  I also suggest reading a couple of basic C# books.

 

Also, it helps to try and develop your code with Revit's built in macro editor.  That saves a lot of starting and restarting revit, although some modifications may be necessary to port it over to a full add-in.  And there are some things you just can't do with the macro editor.

 

Message 3 of 8

jeremytammik
Autodesk
Autodesk

Thank you for your appreciation and notes on getting started.

 

Sorry you had to struggle so and congratulations on making progress.

 

Did you work through the standard getting started material?

 

http://thebuildingcoder.typepad.com/blog/about-the-author.html#2

 

Unfortunately, that does not cover the new digital signing procedure.

 

That is discussed in depth in this other thread:

 

http://forums.autodesk.com/t5/revit-api/code-signing-of-revit-addins/m-p/5981560

 

I hope this helps.

 

Best regards,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 4 of 8

Anonymous
Not applicable
Accepted solution

In visual studio u can use in the menu bar: Tools -> Create GUID -> Choose 5. -> and u get something like this: [Guid("25C1232E-6BF8-4C2A-B89B-5D0ED87DC30E")]

Remove everything except the inner numbers and u have a GUID:

 

25C1232E-6BF8-4C2A-B89B-5D0ED87DC30E

 

 

And I think to get a developer shortcut you have to be an member of the ADN. Not for free I guess

0 Likes
Message 5 of 8

GTisRuleX
Advocate
Advocate

I'm onto the 4th chapter on "debugging" and still having a few issues.  I got sidetracked on this digital certificate, and learning MS had deprecated the "makecert.exe" process.  

 

Thank you for providing the second link on this, Seems every time I'm getting toward my solution of "getting started" the information is out of date and practices have changed.  Autodesk's ADN doesn't mention at all about the GUID errors you offered a working solution to on your Blog.  I assume they're working with a clean, OOTB version of Revit, where I'm in a production environment, and have to drop what I'm doing often and help out a project and our processes rely on a number of 3rd party apps.

0 Likes
Message 6 of 8

stever66
Advisor
Advisor

And here I've just been typing in random hexadecimal numbers.   I guess using the generator guarantees there won't ever be any duplicate numbers, but the odds of that ever happening seem too low to worry about unless you are a company the size of autodesk.

 

make sure you download the software developers kit.  You will want to have the API additions and changes documents handy.  I was hoping the "changes" would slow down, but there doesn't seem to be any sign of that, so API programming remains a moving target that's hard to keep up with.

 

also, I tried to put some basic "getting started" stuff online to help others and so I could keep track of what I learned, but I didn't get very far, and it's probably a little dated already.   But if you are interested try searching the web for API-123.

Message 7 of 8

jeremytammik
Autodesk
Autodesk

Dear Steve,

 

Great stuff!

 

Thank you for pointing it out!

 

May I mention it on The Building Coder as well?

 

here are some explicit direct links to and into Steve's material:

 

 

Cheers,

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 8 of 8

GTisRuleX
Advocate
Advocate

I've been reading on "The building coder" quite a lot these days!  Tons of info there, thank you for that!

0 Likes