Пример #1
0
 def in_use_dict(doc=revit.doc):
     """ Return a dictionary of fluids in use with system as key
     >>> FluidType.in_use_dict() # return format: {system.name:{'name':fluid.name, 'temperature':temperature}
     {'Hydronic Return': {'name': 'Water', 'temperature': 283.15000000000003}, ...}
     """
     result = {}
     for system in DB.FilteredElementCollector(doc).OfClass(DB.Plumbing.PipingSystemType):
         rpw_system = Element(system)
         rpw_fluid_type = Element.from_id(system.FluidType)
         result[rpw_system.name] = {'name': rpw_fluid_type.name, 'temperature': rpw_system.FluidTemperature}
     return result
Пример #2
0
 def test_view_wrapper(self):
     wrapped_view = Element(self.view)
     self.assertIsInstance(wrapped_view, View)
     wrapped_view = View(self.view)
     self.assertIsInstance(wrapped_view, View)
Пример #3
0
 def test_view_family_aggregator(self):
     wrapped_view_plan = Element(self.view_plan)
     same_view_family_type_views = wrapped_view_plan.view_family_type.views
     for view in same_view_family_type_views:
         self.assertEqual(view.view_family_type.unwrap(),
                          wrapped_view_plan.view_family_type.unwrap())
Пример #4
0
 def test_view_family(self):
     wrapped_view = Element(self.view_3d)
     view_family = wrapped_view.view_family
     self.assertIsInstance(view_family.unwrap(), DB.ViewFamily)
Пример #5
0
 def test_view_family_type(self):
     wrapped_view = Element(self.view_3d)
     view_type = wrapped_view.view_family_type
     self.assertIsInstance(view_type.unwrap(), DB.ViewFamilyType)
Пример #6
0
 def test_view_plan_level(self):
     wrapped_view = Element(self.view_plan)
     level = wrapped_view.level
     self.assertIsInstance(level, DB.Level)
Пример #7
0
 def test_view_type(self):
     wrapped_view = Element(self.view_3d)
     view_type = wrapped_view.view_type
     self.assertIsInstance(view_type.unwrap(), DB.ViewType)
     self.assertEqual(view_type.unwrap(), DB.ViewType.ThreeD)
     self.assertEqual(view_type.name, 'ThreeD')
Пример #8
0
 def test_view_family_type(self):
     wrapped_view_family_type = Element(self.view_family_type)
     self.assertIsInstance(wrapped_view_family_type, ViewFamilyType)
     wrapped_view_family_type = ViewFamilyType(self.view_family_type)
     self.assertIsInstance(wrapped_view_family_type, ViewFamilyType)
Пример #9
0
 def test_view_3D(self):
     wrapped_view_3d = Element(self.view_3d)
     self.assertIsInstance(wrapped_view_3d, View3D)
     wrapped_view_3d = View3D(self.view_3d)
     self.assertIsInstance(wrapped_view_3d, View3D)
Пример #10
0
 def test_view_schedule_wrapper(self):
     wrapped_view_schedule = Element(self.view_schedule)
     self.assertIsInstance(wrapped_view_schedule, ViewSchedule)
     wrapped_view_schedule = ViewSchedule(self.view_schedule)
     self.assertIsInstance(wrapped_view_schedule, ViewSchedule)
Пример #11
0
 def test_view_sheet_wrapper(self):
     wrapped_view_sheet = Element(self.view_sheet)
     self.assertIsInstance(wrapped_view_sheet, ViewSheet)
     wrapped_view_sheet = ViewSheet(self.view_sheet)
     self.assertIsInstance(wrapped_view_sheet, ViewSheet)
Пример #12
0
 def test_view_section_wrapper(self):
     wrapped_view_section = Element(self.view_section)
     self.assertIsInstance(wrapped_view_section, ViewSection)
     wrapped_view_section = ViewSection(self.view_section)
     self.assertIsInstance(wrapped_view_section, ViewSection)
Пример #13
0
 def test_view_plan_wrapper(self):
     wrapped_view_plan = Element(self.view_plan)
     self.assertIsInstance(wrapped_view_plan, ViewPlan)
     wrapped_view_plan = ViewPlan(self.view_plan)
     self.assertIsInstance(wrapped_view_plan, ViewPlan)