I am trying to create a script that will use lines to create sections using python
viewFamilyTypes = (FilteredElementCollector(doc).OfClass(ViewFamilyType).ToElements())
vftLst = []
for vf in viewFamilyTypes:
if vf.LookupParameter("Type Name").AsString() == secTypeName:
vftLst.append(vf.Id)
section1_create = ViewSection.CreateSection(doc, vftLst[0], bbox_sections[0])
I am facing issues with the bbox_sections(Bounding Box)
Below is the Bounding Box constructor
new_boundingbox = []
for min_pt, max_pt in zip(min_pts, moved_max_pts):
temp = BoundingBoxXYZ()
temp.Min = XYZ((min_pt.X) / 304.8, (min_pt.Y) / 304.8, (min_pt.Z) / 304.8)
temp.Max = XYZ((max_pt.X) / 304.8, (max_pt.Y) / 304.8, (max_pt.Z) / 304.8)
new_boundingbox.append(temp)
bboxOffset_floorPlan = UnitUtils.ConvertToInternalUnits(750, UIunit)
scaled_bounding_box = []
for bbox in new_boundingbox:
temp = OffsetBBox(bbox, bboxOffset_floorPlan)
scaled_bounding_box.append(temp)
I need some help with the transformation of the bounding box, which throws an exception:
The BoundingBoxXYZ is not appropriate for detail views. The basis vectors of must be unit length and orthonormal. The near and far bound offsets cannot be reversed or too close to each other. MinEnabled and MaxEnabled must be set to true for all three directions