Make instance and its parameters NOT editable

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am getting familiar with the Revit API (in C#) and am now stuck at a problem I could not solve via Googling or searching here in the forum.
At some point at creating a drawing, we have a status of instances in the drawing, that the user/architect is NOT allowed anymore to change ANY parameters in the instance and is NOT allowed to move the instance at all!
So I found out, that you can pin the elements and make them not selectable anymore:
element.Pinned = true
var options = SelectionUIOptions.GetSelectionUIOptions();
options.SelectPinned = false;
Also I could add a Trigger to observe a custom parameter or a built in parameter.
BUT(!) the user can still check that checkbox of the "Select pinned elements" again and I cannot find an Event that observes these user action.
The DocumentChanged event is not fired, when I click on that checkbox.
Is there any other option to make instances not editable anymore? Or can I observe the action of the user, when he/she is checking or unchecking the Selection option?
My workaround would be, that if the user would want to change the element again and it has this kind of (locked) status set, to observe this and undo the action. But this is such a dirty workaround I would not be happy with it.
I would have to set a trigger for everything in this element.. And in my opinion this is a bad solution.
Thanks a lot in advance!!
BR
Diana