I want it to work in the codes I want with Revit opened. " using (var collector = new FilteredElementCollector(doc))" in this line goes into a loop after the code. It also does this in my other "doc" requested codes. As a result, the codes I want do not work. Is it because of "doc = null" or is there a different problem?
Solved! Go to Solution.
Solved by oguzkomcu. Go to Solution.
Hi @oguzkomcu ,
Please take a look at the below link
I fixed the document error but my loop error continues. When I want "ActiveView", I run the method again, come to the uiapp.OpenAndActivateDocument method, return to the beginning of the method and loop it. What is the reason of this ?
Hi,
Error checking helps figure these issues out. Have you tried using a Try{} Catch{}(ex Exception) to see what Revit tells you when you attempt to get the active view? Have you tried getting the active view using Document.ActiveView()?
Can't find what you're looking for? Ask the community or share your knowledge.