I would like to know the version of a rvt file before opening the file in revit

I would like to know the version of a rvt file before opening the file in revit

Anonymous
Not applicable
3,698 Views
8 Replies
Message 1 of 9

I would like to know the version of a rvt file before opening the file in revit

Anonymous
Not applicable

In Revit, once the user selected *.rvt file using File->open dialogue and I would like to know the version of a rvt file before opening the file in revit. I am using handler  < puiApp.ControlledApplication.DocumentOpening += new EventHandler<DocumentOpeningEventArgs>(app_DocOpening);> to grab the information. Kindly help.

 

 

0 Likes
3,699 Views
8 Replies
Replies (8)
Message 2 of 9

naveen.kumar.t
Autodesk Support
Autodesk Support

Hi @Anonymous,

Try using the below link

basic-file-info-and-rvt-file-version


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

Message 3 of 9

naveen.kumar.t
Autodesk Support
Autodesk Support

HI @Anonymous,

If it solves your problem..could you please accept it as solution?Smiley Very Happy


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 4 of 9

Anonymous
Not applicable

Hi Naveen,

One more help. 

I want to get the Revit application version and Build number before opening the rvt file.

What is API (C#) call?

 

Not the rvt file. Revit application version and Build number as I don't have any document handle.

 

Kindly let me know.

 

 

 

0 Likes
Message 5 of 9

FlorisvdG
Advocate
Advocate
0 Likes
Message 6 of 9

jeremytammik
Autodesk
Autodesk

Dear Vijaya,

 

Thank you for your query.

 

As Naveen and Floris very kindly pointed out (thank you, guys! (Vijaya, a thank you is in order for an answer)), these questions that have been asked in the past and you can easily answer them yourself with a simple web search, e.g., searching for "revit api determine rvt file version":

 

https://duckduckgo.com/?q=revit+api+determine+file+version+rvt

 

Learning and practicing answering your questions yourself will make you more competent and productive in the long run, save other developers unnecessary effort, and free us all up to be more creative and productive in areas that really make a difference.

 

I hope you don't mind me pointing this out.

 

Thank you for your understanding, and good luck with your programming tasks.

 

Best regards,

 

Jeremy

 



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

Message 7 of 9

Anonymous
Not applicable

Thank you all.

0 Likes
Message 8 of 9

Chuong.Ho
Advocate
Advocate

You can have simple solution by using  Revit Extractor : https://github.com/chuongmep/revit-extractor

Make sure you installed package and us right command :

from revit_extract import RevitExtractor
rvt_path = r"D:\_WIP\Download\Sample Office Building Model V1.rvt"
version = RevitExtractor.get_version(rvt_path)
print(version)

 

Chuong Ho

EESignature

Message 9 of 9

Chuong.Ho
Advocate
Advocate

Another way for you in case you don't need to use python, and just want to use it, let's download this msi installer  :

https://www.mediafire.com/file/3urx5nj46wfc80y/RevitCheckerVer1.0.0.msi/file

This is step to see it :

- Go to your revit file

- Right click in to file and choose revit version

ChuongHo_0-1729152030155.png

- Bump, you will see version of file in popup.

Chuong Ho

EESignature

0 Likes