How to "Unwrap" Axonometric View in Zero Touch Node (C#)

I’m using Revit.Elements.Views Axonometric View to create 3D views in my zero touch node.

I want to be able to use Revits 3DView methods (such as unlock) once the view is created; however, I need to “Unwrap” to convert to revit object first.

I’ve tried view.InternalElement; however, this returns a revit Element class not a revit View3D class.

In Python I could accomplish this by simply UnwrapElement(view).

Anyone know how to do this conversion in C#? Thanks in advance!

Perhaps you could try to cast it to a View3D? View3D is a subset of the Element class, so it technically is an element itself. Something like this:

View3D view3d = internalElement as View3D;
view3d.Unlock();
1 Like

Thank you cgartland for your prompt response!

I did not know about “casting”. I just started learning C#.

Your help is much appreciated. Have a great day!

Just started learning last week myself, so we’re in the same boat haha. Although you’re making a ZT node, you might want to check out the Revit plug-in tutorial as it provides some additional Revit-centric references. Casting is used in the first tutorial, found here.

1 Like

I will definitely review that, thanks for the suggestion. Good luck with your C# efforts!