Fix #2975. Fix bug where imperial projects still created drawings with metric scales by default.

This commit is contained in:
Dion Moult
2023-04-16 23:18:22 +10:00
parent 6e3336afb1
commit 784b5156df
+8 -2
View File
@@ -189,13 +189,19 @@ def add_drawing(ifc, collector, drawing, target_view=None, location_hint=None):
ifc.run("group.assign_group", group=group, products=[element])
collector.assign(camera)
pset = ifc.run("pset.add_pset", product=element, name="EPset_Drawing")
if drawing.get_unit_system == "METRIC":
scale = "1/100"
human_scale = "1:100"
else:
scale = "1/96"
human_scale = "1/8\"=1'-0\""
ifc.run(
"pset.edit_pset",
pset=pset,
properties={
"TargetView": target_view,
"Scale": "1/100",
"HumanScale": "1:100",
"Scale": scale,
"HumanScale": human_scale,
"HasUnderlay": False,
"HasLinework": True,
"HasAnnotation": True,