Revit API - 3D view creation function createIsometricView() does not recognize the int as element ID

Hello -

I’m a VDC engineer, and I’m trying to use Revit API in Dynamo to create a 3D view using the existing elements in my model. However, the createIsometricView() function doesn’t recognize my element ID. It refuses to see int as ID. In addition, if the function works, we can only create 3D views with one element in them. Because it doesn’t take a list of elements. Is there any other way to create 3D views using API?

This should work, so it sounds as if there is an issue in the graph. Can you post an image created using the export canvas as image button (top right button that looks like a camera) after you zoom in so the node names are visible? Be sure to expand the data preview for all nodes moving into the non-functioning node, and annotate any custom modes which are in use with the package they came from (the Monocle view extension will do this for you, it can be downloaded via the package manager).


Hello Jacob -

I have tried to use input a single element ID as int into my script, and the error message said it is not an element. Therefore, I guess the 3D view API recognizes ElementID differently.

Issue resolved.

Apparently, int is not always the ElementID Revit is looking for. Sometimes, we need to convert int into actual ElementID type.
Reference from API: