Check the version of a Revit file hosted on the cloud
By Augusto Goncalves
February 21, 2019
With Design Automation for Revit we can select which engine to use, 2018 or 2019. And it's important to choose the correct one in order to avoid opening with an older version or saving with a newer version, e.g. if you have a 2018 file and open and save with 2019 engine.
Jeremy Tammik did an interesting blog post about it, in summary reading the file information that is encoded inside the bytes. This approach still valid, but if the file is on the cloud, we don't want to download it (it may be too big). But we don't need, actually, just need the first few KBs.
The following code sample downloads a few KBs, then if it finds "Autodesk", it created a dictionary with the values.
The result will look like. Note the list of values may vary depending on which features were used to create the file.
See the original posting on the Autodesk Forge website »
Questions? Contact the original publisher »
No comments:
Post a Comment