Quantcast
Channel: All Revit API Forum posts
Viewing all articles
Browse latest Browse all 66666

Re: ToRoom/FromRoom python issue

$
0
0

jeremy, first thank you for your hint pertaining the inefficiency in my collector.

secondly you are right, the problem is caused by the overloaded version.

i just added the phase and retrieve the rooms as expected.

tx peter

 

here the code:

fc = FilteredElementCollector(doc)
doors = fc.OfCategory( BuiltInCategory.OST_Doors ).WhereElementIsNotElementType()
phases = doc.Phases
phase = phases[phases.Size - 1]

for door in doors:
	try:
		froom = door.FromRoom[phase].Id
	except:
		froom = -1
	try:
		troom = door.ToRoom[phase].Id
	except:
		troom = -1

	TaskDialog.Show("Revit","From Room: %s, To Room: %s" %(froom, troom))

 


Viewing all articles
Browse latest Browse all 66666

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>