Assign View Templates to Depedent Views

Hello I Think I just discovered a bug in the Revit API…

I where having a script that assigns templates to independent views, worked like a charm.
Then I assigned the templates to dependent views and i just didn’t work at all.
Here a picture with the dynamo and the revit view:

The worst part is, that the API reports back that the viewtemplate.id is well assigned to the according template, but actually no#

Any ideas how to counter act, it’s like the revit database is doing a rollback as soon as the template is assigned to the dependent view.

btw. this is the case for revit 2018 / 2019
And when i do it manually it works fine, of cause

I suggest you to get primary/parent view in the first place from top left node

First, I’ll state: I have no idea what information about dependent views is available via the API. I don’t know how to sort dependent views from non-dependent views, or how to grab the parent view of a dependent view.

However: as the name implies, most properties of a dependent view can’t differ from the parent view. They are derived from the parent view, and can’t be changed independently. Sure, the Revit UI will allow you to change the properties of a dependent view via the properties palette, but the control actually changes the properties of the parent view- and therefore, any other views dependent on the parent as well.

So, my guess is that you need to (via the API) get the parent view and change the properties of the parent view, instead of the dependent view.

If you need to change the view template of a dependent view to something other than the parent view, you’ll have to first convert it to an independent view and then assign a view template to the new(?) independent view. (Again, I have no idea how to do this via the API, or even if it’s possible.)

Joe