Newbie questions

Newbie questions

StrRevitEng
Contributor Contributor
450 Views
4 Replies
Message 1 of 5

Newbie questions

StrRevitEng
Contributor
Contributor

Hi,

after some RevitAPI development with pyRevit, I have decided to give C# a go.

 

My questions are as follows:

1. How do I take input from the user? are there any forms for C#?

2. Do I really have to rebuild my code and restart Revit for every change I make in my code?

 

Thank you

0 Likes
451 Views
4 Replies
Replies (4)
Message 2 of 5

jeremy_tammik
Alumni
Alumni

Welcome to the Revit API and hope you enjoy trying it out.

  

First: the Revit API does not provide any ready-made forms that I can think of. Input methods are provided by the Selection class to pick points, elements, subelements:

  

  

You can check out the ADN UI labs for all overview of all the UI methods:

  

  

Second: nope, not necessarily. Here are various ways to avoid that::

  

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 5

StrRevitEng
Contributor
Contributor

Thanks for your answer! Ill definitely will give it a look.

0 Likes
Message 4 of 5

MarryTookMyCoffe
Collaborator
Collaborator

in sdk there is a revit loader you can add your dll there to test dll with out closing revit.

-------------------------------------------------------------
--------------------------------|\/\/|------------------------
do not worry it only gonna take Autodesk 5 years to fix bug
Message 5 of 5

sragan
Collaborator
Collaborator
It doesn't seem like anyone else does this, but I use the revit macros to develop and test code. They allow you to edit the code, rebuild, and run again without having to restart revit.

You may not be able to do everything in the macros that you can do in visual studio, but most of your code can be developed with a macro. And its usually only a few lines of code that need edited to covert a macro over to a VS project.

Also, if you are just starting, Macros are so much easier. No need to write addin files, and no need to add references to the the Revit API.