Changing ViewReference's refernce view problem

Changing ViewReference's refernce view problem

sahin.ikbal
Advocate Advocate
594 Views
3 Replies
Message 1 of 4

Changing ViewReference's refernce view problem

sahin.ikbal
Advocate
Advocate

I want to change ViewReference's refernce view, I have found one method "ReferenceableViewUtils.ChangeReferencedView" but its only working for section or callouts and not ViewReference.
Is there any way to do this for this type of element?

 

 

2022-03-07_12-26-39.png

 

2022-03-07_12-19-24.png2022-03-07_12-19-32.png

0 Likes
595 Views
3 Replies
Replies (3)
Message 2 of 4

Omar_Amen
Advocate
Advocate

Hi @sahin.ikbal,
I've checked an instance of reference view via Revit lookup add-in,
I found that the reference view element's meta data is drafted in a built in Revit parameters and not a C# class props!

parameter.png


I didn't try to update the parameter value, may you give it a try ?
I hope it will work,
Regards,

0 Likes
Message 3 of 4

sahin.ikbal
Advocate
Advocate

That's a Read-only parameter.
I have tried.

0 Likes
Message 4 of 4

Ceorl82
Contributor
Contributor

Has anybody come up with a solution for reassigning the Target View on a callout?  I'm not getting anywhere with the ReferenceableViewUtils.  Does anyone know which ElementIds I should use in the ChangeReferencedView method?  The explanation in the docs is a little confusing.   I've tried both the Element Id attached to the Target View parameter, as well as, the Id returned from the Target Views AsElementId method.  Both produce the "invalid reference id" error.

Ceorl82_1-1699549440520.png

As suggestions would be appreciated.

Thanks,

Chuck

 

0 Likes