Understanding Revit API

Understanding Revit API

Anonymous
Not applicable
1,194 Views
6 Replies
Message 1 of 7

Understanding Revit API

Anonymous
Not applicable

I am attempting to get some values from fabrication parts that we cannot see in revit. Dynamo does not take care of my needs, so I am learning python in order to help. I am stumbling along in the API and need some help. I want to access the dimensions in the ITM's. Reading through the API I need to be using a combination of "GetDimensions" and "GetDimensionValue". When using "GetDimensionValue" it requires a "FabricationDimensionDefinition" that I cannot figure out. Can anybody help? Thanks.

0 Likes
Accepted solutions (3)
1,195 Views
6 Replies
Replies (6)
Message 2 of 7

jeremytammik
Autodesk
Autodesk
Accepted solution

The easiest way to manually explore properties and relationships of Revit elements is to install RevitLookup:

 

https://github.com/jeremytammik/RevitLookup

 

You will be happy to have it, since it can be used to explore all elements and all their properties and relationships.

 

Exploring how to navigate to the data item you are after in RevitLookup will show you the correct path to use in your Python code as well.

 

Cheers,

 

Jeremy



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

0 Likes
Message 3 of 7

Anonymous
Not applicable

Thank you for the reply. Also, thank you for all the information you provide on the other sites. I have been reading a lot of your post. 

 

I just downloaded that very one and when I copied the .addin file to the addin location, revit popped up and said "Failed to initialize the add-in "Revit Lookup" because the assembly "RevitLookup.dll" does not exist. Not sure what I did wrong. This is not the first add-in I have installed.

0 Likes
Message 4 of 7

Anonymous
Not applicable
Accepted solution

I was able to install it using the wizard. 

0 Likes
Message 5 of 7

jeremytammik
Autodesk
Autodesk

What wizard?



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

0 Likes
Message 6 of 7

Anonymous
Not applicable
0 Likes
Message 7 of 7

jeremytammik
Autodesk
Autodesk
Accepted solution

Wow, great! Thank you for letting us know.

 

I added a note of Harry's installer to the RevitLookup GitHub repo:

 

https://github.com/jeremytammik/RevitLookup#installation

 

Cheers,

 

Jeremy



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