Auto create elevation views and markers - script not working

Hi people,

I am working on a script to mass produce elevation views for a series of rooms inside model groups. The idea is that you might have a series of apartment types with rooms in them and for every apartment type, you make elevation and place them into a view plan.

See my script. I am having a bit of trouble at the end where I use the room boundary curves to determine where the elevation markers should be placed and cropped to.

As you can see I am getting a null result.

If anyone knows why this is happening and can help me out, thank you in advance!

Kind regards
Tiara AutoPlanElevateRoom_ForumQuestion.dyn (61.5 KB)

What does the error say?

It’s looking for a ViewType, not a specific view.

Thanks Nick!