Revit Custom File Properties

Revit Custom File Properties

Anonymous
Not applicable
3,436 Views
10 Replies
Message 1 of 11

Revit Custom File Properties

Anonymous
Not applicable

 

Hi, does anyone know how to access read/write to Revit file custom properties using vb.net & Rrevit API?

 

All the best

Steve

 

 

rvt properties.png

0 Likes
Accepted solutions (2)
3,437 Views
10 Replies
Replies (10)
Message 2 of 11

jeremytammik
Autodesk
Autodesk
Accepted solution

Dear Steve,

 

These look like properties associated with the specific project document.

 

You should try to find them using RevitLookup.

 

That would show you how to access them progrmmatically from your own add-in as well.

 

Cheers,

 

Jeremy



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

Message 3 of 11

Anonymous
Not applicable

Hi Jeremy,

 

Using Revit LookUp 2014 was unable to locate the rvt custom file properties!

 

Any ideas as to how I can read write to these propeerties would be welcome.

 

All the best

Steve

0 Likes
Message 4 of 11

jeremytammik
Autodesk
Autodesk

Hi Steve,

 

Sorry about the totally wrong initial answer I gave.

 

The question came up again now on Stack Overflow, with some more useful answers.

 

I published a summary of the results here:

 

http://thebuildingcoder.typepad.com/blog/2015/09/lunar-eclipse-and-custom-file-properties.html#3

 

Cheers,

 

Jeremy



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

Message 5 of 11

Anonymous
Not applicable

@Anonymous wrote:

Hi Steve,

 

Sorry about the totally wrong initial answer I gave.

 

The question came up again now on Stack Overflow, with some more useful answers.

 

I published a summary of the results here:

 

http://thebuildingcoder.typepad.com/blog/2015/09/lunar-eclipse-and-custom-file-properties.html#3

 

Cheers,

 

Jeremy


Hi Jeremy,

 

Thanks for the link

 

In the end I used the Revit Project Properties to store the information.

 

Had to revise the code for Revit 2015 due to the API changes.

 

More than happy to show/share my add-in if you are interested. 

 

It's a SaveAsTool for BIM, It uses the properties to store Metadata.

 

All the best

Steve

 

BIM-SaveAsTool.jpg

 

 

 

0 Likes
Message 6 of 11

jeremytammik
Autodesk
Autodesk
Accepted solution

Dear Steve,

 

Congratulations on solving it and publishing your tool!

 

That is a perfectly viable way to go as well, of course.

 

The Revit way, in this case  🙂

 

Thank you for the offer!

 

Cheers,

 

Jeremy



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

Message 7 of 11

Keith_Wilkinson
Advisor
Advisor
Is there any way to search for this info within Windows explorer? I'm looking to add a classification system to some of our families and having it as a file property that was searchable would be extremely helpful...


"Give a man a fish and you feed him for a day; teach a man to fish and you feed him for a lifetime."
Maimonides
0 Likes
Message 8 of 11

jeremytammik
Autodesk
Autodesk

Dear Keith,

 

Sure you can.

 

Take a look at the Windows Search functionality:

 

https://msdn.microsoft.com/en-us/library/aa965362(v=vs.85).aspx

 

You can program additonal search fields for specific file types, e.g. for RVT.

 

Cheers,

 

Jeremy



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

0 Likes
Message 9 of 11

Keith_Wilkinson
Advisor
Advisor

Thanks Jeremy, however I should add that although this is the Revit API forum I know very little about programming!  Sorry!!

 

Within the file properties I have the ability to add a field and an associated value.  However this doesn't show up in the list of fields available in Windows Explorer - is this something that would be easy to resolve and give all of our company users access to search?

 

cheers

 

K.



"Give a man a fish and you feed him for a day; teach a man to fish and you feed him for a lifetime."
Maimonides
0 Likes
Message 10 of 11

jeremytammik
Autodesk
Autodesk

Yes, absolutely. 

 

And it requires programming (I imagine).

 

Ask any Windows programmer.

 

Good luck!



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

0 Likes
Message 11 of 11

Keith_Wilkinson
Advisor
Advisor
So not easy then... ;o)


"Give a man a fish and you feed him for a day; teach a man to fish and you feed him for a lifetime."
Maimonides
0 Likes