Getting the Current View in Python

I want to check if rebar is slolid in view and set is as solid.Check Spacing.dyn (20.1 KB)
Clash Detection 2.0.dyn (65.4 KB)

you might want to use another Collector constructor “FilteredElementCollector(doc, doc.ActiveView.Id)”

http://www.revitapidocs.com/2018.1/6359776d-915e-f8a2-4147-b31024671ee1.htm

1 Like

python%202

this is the ouput im getting from it

could you post another screenshot of your modified script? Why you iterate through the collector instead of rebarElements?

I changed that…

line 37, your collector(currview) is not in used.
line 48, lower-case, View instead of VIew.

1 Like

i finally got the view…

using uidoc.activeview

now to check if the rebar is solid in view…im doing it wrong

python%205

showing all rebars are solid…but they arnt…

how is it look like if it is solid :thinking:

like extruded cylinders, i managed to complete the Script to change it to solid,

But when getting the current state its always giving me wrong parameters.