Revit export gltf plugin error

Revit export gltf plugin error

oguzkomcu
Enthusiast Enthusiast
383 Views
2 Replies
Message 1 of 3

Revit export gltf plugin error

oguzkomcu
Enthusiast
Enthusiast

This is my fault;

Method not found: 'System.String Autodesk.Revit.DB.View.get_ViewName()'.

I couldn't find anything online about this error.I would be very happy if someone answers.

0 Likes
Accepted solutions (1)
384 Views
2 Replies
Replies (2)
Message 2 of 3

naveen.kumar.t
Autodesk Support
Autodesk Support

Hi @oguzkomcu ,

 

Looks like Revit Cannot find the method "get_ViewName()".

To get the View name, please use the below code

Autodesk.Revit.DB.View view;
string viewName=view.Name;

 


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 3 of 3

Kennan.Chen
Advocate
Advocate
Accepted solution

The version of RevitAPI.dll you reference in your add-in project mismatches with the one Revit provides at runtime.

 

Autodesk.Revit.DB.View.ViewName is declared as obsolete in Revit 2019 and is permanently removed in Revit 2020.

 

Your add-in project might be referencing Revit sdk 2014-2019 and you try to run your add-in under Revit 2020-2022.

 

BTW, mismatching revit sdk version works good if the APIs you call is the same between the two versions. It only breaks if you use a changed API.