From eca3ce2dde27ac24c88d20426f290d559c7f25c2 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Sat, 30 Apr 2016 10:47:05 -0300 Subject: [PATCH] Arch: Fixed rebars to work with PartDesignNext --- src/Mod/Arch/ArchRebar.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Mod/Arch/ArchRebar.py b/src/Mod/Arch/ArchRebar.py index b6611f8d4..67160f138 100644 --- a/src/Mod/Arch/ArchRebar.py +++ b/src/Mod/Arch/ArchRebar.py @@ -120,10 +120,11 @@ class _CommandRebar: # we have only the sketch: extract the base object from it if hasattr(obj,"Support"): if obj.Support: - if isinstance(obj.Support,tuple): - sup = obj.Support[0] + if len(obj.Support) != 0: + sup = obj.Support[0][0] else: - sup = obj.Support + print "Arch: error: couldn't extract a base object" + return FreeCAD.ActiveDocument.openTransaction(translate("Arch","Create Rebar")) FreeCADGui.addModule("Arch") FreeCADGui.doCommand("Arch.makeRebar(FreeCAD.ActiveDocument."+sup.Name+",FreeCAD.ActiveDocument."+obj.Name+")")