Revit API

Reply
Member
zwoodruff
Posts: 4
Registered: ‎06-11-2012
Message 1 of 8 (313 Views)

How to create a Revit palette/window to display the results of calculations

313 Views, 7 Replies
06-18-2012 01:53 PM

Hello,

 

I am developing an application that performs some calculations on a revit model and then displays the results to the user. Is there a way to create a window/palette like the properties or project browser windows where the results of the calculations can be displayed and updated as the model changes?

 

Thanks for the help.

ADN Support Specialist
jeremytammik
Posts: 639
Registered: ‎08-20-2007
Message 2 of 8 (306 Views)

Re: How to create a Revit palette/window to display the results of calculations

06-19-2012 02:10 AM in reply to: zwoodruff

Dear Zwoodruff,

Nope, not really. The Revit external application frmaework enables you to add certain widgets to the Revit ribbon, no more. For what you describe, you would have to rool your own, e.g. using the .NET framework.

Best regards,

Jeremy
--
Jeremy Tammik
Autodesk Developer Network -- http://www.autodesk.com/joinadn
The Building Coder -- http://thebuildingcoder.typepad.com



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

Member
zwoodruff
Posts: 4
Registered: ‎06-11-2012
Message 3 of 8 (299 Views)

Re: How to create a Revit palette/window to display the results of calculations

06-19-2012 08:22 AM in reply to: jeremytammik

Thank you for your help. Do you have an example of how I might do something similar with the .NET framework? The point of the add-in is to provide the calculations in an "in your face" way throughout the design process so that the user will be more conscious of how changes to the model effect the results.

 

Is there a way to develop an external program that can access properties, geometry, and material data from Revit continuously (or something like five minute intervals), and then provide the results of the calculations?

 

Thanks.

ADN Support Specialist
jeremytammik
Posts: 639
Registered: ‎08-20-2007
Message 4 of 8 (297 Views)

Re: How to create a Revit palette/window to display the results of calculations

06-19-2012 08:47 AM in reply to: zwoodruff

Dear Zwoodruff,

Here is a really old example:

http://thebuildingcoder.typepad.com/blog/2009/10/modeless-pressure-drop-tool.html

This is a modeless form which reamins displayed as long as the command is active, blocking further Revit activity.

You would probably want something completely modeless.

For that please look at the ModelessDialog ModelessForm_ExternalEvent and ModelessForm_IdlingEvent SDK samples:

http://thebuildingcoder.typepad.com/blog/2012/03/new-revit-2013-sdk-samples.html#1

Best regards,

Jeremy
--
Jeremy Tammik
Autodesk Developer Network -- http://www.autodesk.com/joinadn
The Building Coder -- http://thebuildingcoder.typepad.com





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

Member
zwoodruff
Posts: 4
Registered: ‎06-11-2012
Message 5 of 8 (287 Views)

Re: How to create a Revit palette/window to display the results of calculations

06-20-2012 10:34 AM in reply to: jeremytammik

Thanks again for the help, that looks like the best way to implement this. I tried to load the samples and am getting the error "Object reference not set to an instance of an object." when I try to run them. Do you know what the problem might be? I didn't make any changes to the sample program I simply compliled it and added the .addin reference to the .dll file. 


Best regards,

 

Zack

ADN Support Specialist
jeremytammik
Posts: 639
Registered: ‎08-20-2007
Message 6 of 8 (285 Views)

Re: How to create a Revit palette/window to display the results of calculations

06-20-2012 10:57 AM in reply to: zwoodruff

hi zack.

 

oh, your name is zack?

 

zwoodruff could be interpreted as germen slang for 'add two', 'zwoo druff', 'zwei drauf'  :-)

 

which was what i imagined was the origin for your moniker  :-)

 

nope, no idea what is going on.

 

grab your debugger, find out, fix it, and let me know, please!

 

cheers

 

jeremy

 

 

 



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

Member
zwoodruff
Posts: 4
Registered: ‎06-11-2012
Message 7 of 8 (281 Views)

Re: How to create a Revit palette/window to display the results of calculations

06-20-2012 12:52 PM in reply to: jeremytammik

Hi Jeremy,

 

I tried debugging and it gave the same issue, and attempted running it with the Add-in manager and RvtSample and neither were working. After fussing around I simply started over from scratch and something worked. One of those programming problems that seems to miraculously fix itself.

 

Thanks for the help and the interesting sidetrack into some german slang!

 

Zack

ADN Support Specialist
jeremytammik
Posts: 639
Registered: ‎08-20-2007
Message 8 of 8 (278 Views)

Re: How to create a Revit palette/window to display the results of calculations

06-20-2012 01:40 PM in reply to: zwoodruff

thank for letting me know, and sorry for the hassle you had to go through...



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

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!