Revit APP Blog

Information on Revit APP.

Browsing Posts published in April, 2010

I used Revit 2009 API to add dimensions for elements in 3D, there is a function named NewDimension to create dimension. However, I failed to see the dimension even the function return success when I did it in 3D view (original 3D view and not rotate yet.). I tried to pass different parameter to the NewDimension API function, but all failed. After that, I tried to rotate the 3D view and tried the API again, I found when the dimension’s direction (the direction of the dimension line) is perpendicular with the view normal, we can create the dimension successfully. Then I got an idea to add dimensions for all elements in 3D view: rotate the view, then call NewDimension for those dimensions can be created, and repeat this several time, we can get all elements’ dimension. However, I found there is no API function to rotate the 3D view ( or set view normal). So finally, I have to get a workaround: let user rotate 3D view, and click the button to add dimension several times.

Generally Revit API will do what we want. But we know that Revit API is not strong enough as AutoCAD API. Sometimes it doesn’t work as expected, however, there may be some tricky way we can finish our job with some tries. This is only a small case we might meet when we develop revit apps. However, it may give some thoughts when we encounter problems using Revit API.

There is a wonderful site for Revit Family knowledge: skills for Revit family creation or edition. The site link is: http://www.revitcad.com/. However, the language of this site is Chinese, you may be difficult to read it, anyway, we can get help from google translate: http://translate.google.com/. You will find many very useful experiences there, some of them may be you never think about :)

Get the Autodesk Revit SDK from ADN or the installation DVD. The Autodesk Revit 2011 SDK can be unpacked and installed from the Tools and Utilities option in the installation DVD. In the SDK, there are example files that will help you get a better understanding of the API and its use. Each example file has a sample revit.ini file with the information that you will need to edit and place into the revit.ini file located in your Autodesk Revit Program folder, which Autodesk Revit will access on launch.
• Unzip the SDK onto a local drive
• Read the Read Me First.doc in the SDK
RevitAPI.chm is the Autodesk Revit API reference documentation help file, included with the SDK package in the \Revit 2011 SDK\ folder.
Resources:
http://www.autodesk.com/adn – Autodesk Developer Network home (ADN)
http://www.autodesk.com/developrevit – Autodesk Revit development resources
http://discussion.autodesk.com – Autodesk product discussion groups
Select = Autodesk Revit Architecture
Then Select = Autodesk Revit API
http://thebuildingcoder.typepad.com/blog/ – The Building Coder, an AND blog dedicated to Revit coding.

Revit auto dimension app will help you add dimensions to all pipe, duct, cable tray and conduit elements in current view by only one step. Let you free from tedious work for adding dimensions.

The link is: http://en.revitapp.com/auto_dimensions.html

Powered by WordPress Web Design by SRS Solutions © 2012 Revit APP Blog Design by SRS Solutions