diff --git a/FingerJoints.manifest b/FingerJoints.manifest index b82a034..d51b450 100644 --- a/FingerJoints.manifest +++ b/FingerJoints.manifest @@ -6,7 +6,7 @@ "description": { "": "An add-in for making finger joints." }, - "version": "1.3.0", + "version": "1.4.0", "runOnStartup": true, "supportedOS": "windows|mac", "editEnabled": true diff --git a/FingerJoints.py b/FingerJoints.py index c8f6e09..acfff8c 100644 --- a/FingerJoints.py +++ b/FingerJoints.py @@ -86,6 +86,12 @@ def doExecute(self): def createCustomFeature(self, inputs, toolBody0, toolBody1): app = adsk.core.Application.get() activeComponent = app.activeProduct.activeComponent + design = activeComponent.parentDesign + + # Temporarily switch to parametric design + previousDesignType = design.designType + design.designType = adsk.fusion.DesignTypes.ParametricDesignType + # We will later group all created features into a custom feature. # For that reason, we have to remember the first and last feature that is part of this group. tool0Feature = createBaseFeature(activeComponent, toolBody0, "tool0") @@ -93,6 +99,8 @@ def createCustomFeature(self, inputs, toolBody0, toolBody1): tool1Feature = createBaseFeature(activeComponent, toolBody1, "tool1") createCutFeature(activeComponent, inputs.body1, tool1Feature) + design.designType = previousDesignType + def onDestroy(self, args: adsk.core.CommandEventArgs): super(CreateFingerJointCommand, self).onDestroy(args) if args.terminationReason == adsk.core.CommandTerminationReason.CompletedTerminationReason: