Getting the Current View in Python

python

#1

I want to check if rebar is slolid in view and set is as solid.Rebar Solid.dyn (3.9 KB)


#2

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


#3

python%202

this is the ouput im getting from it


#4

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


#5

I changed that…


#6

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


#7

i finally got the view…

using uidoc.activeview

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


#8

showing all rebars are solid…but they arnt…


#9

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


#10

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.