Skip to content

Commit

Permalink
Arch: Fixed rebars to work with PartDesignNext
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Apr 30, 2016
1 parent a38a78f commit eca3ce2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Mod/Arch/ArchRebar.py
Expand Up @@ -120,10 +120,11 @@ def Activated(self):
# 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+")")
Expand Down

0 comments on commit eca3ce2

Please sign in to comment.