i have a Python script that uses the multi reference annotation command but only for vertical rebars in a section view and i need it for horizontal and diagonal rebar sets in section views and all rebars in floor plans as well.
What I can understand from all of this is that the script can’t find any views in the first input. Can you check if your view get’s collected correctly as a view element in Dynamo?
Try replacing line 609 to asms = view (thus removing the filtredelementcollector)
The elementcollector tries to collect elements in the view but since you’re inputting a view it can’t find the view… I hope you understand what I mean by that
You can comment out lines in a python script by using a #. The line then doesn’t get read by the python interpreter.
Yes i know what the filteredelementcollector is doing, thanks!
Did i do it right? I think it need the view Id, anyways without the .Id i get the same warning
Don’t pin me down on this explaination, but what it means is that you’re trying to call a property or index on an object which doesn’t have those kind of options. For a bit more indepth explaination check the link below.
What’s going wrong here is that you now try to get the index of the view in line 612 (asms[0]) You can’t do this because you’re not accessing a list objecttype. Also, since you now get the ID in line 611 you can’t get the ID in line 612 again because you’re effectively telling python to get the ID of an ElementId objecttype.
To solve this, either comment out line 612 and replace every instance of “ids” with “asms” or set the variable ids to asms (ids = asms)
If you’re having a problem with python try googling it outside of any Dynamo issue. Python is a widely used scripting language with a lot of documentation and users outside of the Dynamo community. I also highly recommend learning basics like this (if you aren’t already) if you have to use python more often in your Dynamo workflows. I especially recommend learning python if you use scripts you haven’t written yourself since it’s key to understand and customize a script to your needs.
Questions are ofcourse always welcome!
Hope this solves the problems you’re having and goodluck!