You can make a new
Lisk from a
HashSet like so:
someList = List[ElementId](someSet)
You should be able to iterate over a set, but bear in mind that they are not ordered. That means every time the order of items in a set might be different. Just FYI.
The error you are getting is related to you trying to call
doc.GetElement() and feeding it a
HashSet as an argument. It expects to get an
Mistake is in this line:
GetAllPlacedViews() returns a
HashSet object, and that is added to the
list. Then when you iterate over that list your argument
v is equal to
HashSet. Perhaps instead of using
extend. That will iterate over all items in a HashSet and add them to the list.