List Imported and Linked Files - set toggle status to all pinned / unpinned

Hi

Help needed, I have followed a tutorial for using Data Shapes/Archi-lab/Bimorphnodes - to create form input to list linked and imported CAD files. The original is allows toggling elements to delete. However, I would like to alter this to ‘set Pinned Status’ of all elements / select elements to pin /unpin.
The final node of the original was Elements.Delete. I replaced with Elements.SetPinnedStatus but its throwing up a Boolean error so i’m now stuck. Any expert help welcome!

Can you post the error code from the set pinned status node, and what the list looks like as it comes from the UI node into the set pinned status node?

My initial thought is it’s a list-level issue, and a list flatten after your data-shapes node should sort it out because I know that the user input output might nest your elements into a 3d list.

I don’t see it being related to the wrong object type being passed, since you’re passing the import instance element to your ListView.Data node as the value.

Thanks,

​Hi, thanks for your response. Here is the error message i’m receiving. Just another note - the original delete script when activated in the Dynamo player, creates a window dialog with lists and selection toggles. Not the case in mines.

You are feeding the Elements Name (string) into Element but it needs the actual Element
(which has an ElementID).

try show us what the datashapes node actuelly gives you, if null you probably need the right ironpython package, or try upgrade to newest as should work with cpython 3…ps…havent tried…but worth to check…