# Element.Pinned usage?

**URL:** <https://forum.dynamobim.com/t/element-pinned-usage/2158>\
**Category:** Packages\
**Created:** [September 14, 2015, 11:07am UTC](https://forum.dynamobim.com/t/element-pinned-usage/2158 "2015-09-14T11:07:35Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![adi](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@adi](https://forum.dynamobim.com/u/adi)\
**Post date:** [September 28, 2018, 5:55pm UTC](https://forum.dynamobim.com/t/element-pinned-usage/2158/4 "2018-09-28T17:55:02Z")

</div>

Sorry to necro this thread.

Based on the discussion above and at the post below

> [@Pin/Unpin Revit elements using Dynamo](https://forum.dynamobim.com/t/pin-unpin-revit-elements-using-dynamo/2792/4):
>
> I actually thought I had rhythm installed and is probably why i couldn’t find it, then noticed i have it for dynamo 0.9.0 but not for my 0.8.2 install(doh). &nbsp; Anyway I have done a quick update to the script to include a toggle for pinning/unpinning, so it should fulfil the topic question slight_smile &nbsp; [Pin all inputted elements v2](http://dynamobim.org/wp-content/uploads/forum-assets/brencass89hotmail-com/12/29/Pin-all-inputted-elements-v2.dyn)

I am trying to use the python script to pin/unpin elements, but to no avail.  
The idea is to make sure that all elements are unpinned before they are modified.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/7/57a2631d275dcd88a87efeaa392a4b304eda1149.png)  
This is the dynamo graph output.  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/1/d1cc389f48dd5d359ef12fb555aa2954b63cc16e.png)

The error popping up is  
“Warning: Element.SetPinnedStatus operation failed. Element cannot be pinned or unpinned.”

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/5/f5ebbf876600b39df98d796cef1d45a471df4e73.png)

On [revitAPI docs it shows](http://www.revitapidocs.com/2018.1/c37bc7f9-409e-9b8a-f491-f700228985e2.htm) its an " [Autodesk.Revit.Exceptions InvalidOperationException]  
which further defines this as [“The exception that is thrown when a method call is invalid for the object’s current state.”](http://www.revitapidocs.com/2018.1/9e715f03-3884-e539-4dd6-8d7545733adc.htm)  
I don’t understand what revit is trying to tell me.

Any help is appreciated.  
– Aditya

---

_[View the full topic](https://forum.dynamobim.com/t/element-pinned-usage/2158)._
