Skip to content

Commit 0c90fd9

Browse files
committed
feat: automatically group generated features to keep timeline tidy
1 parent c777d4f commit 0c90fd9

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

commands/commandCreateBaseplate/entry.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,10 @@ def generateBaseplate(args: adsk.core.CommandEventArgs):
312312

313313
baseplateBody = createGridfinityBaseplate(baseplateGeneratorInput, gridfinityBaseplateComponent)
314314
baseplateBody.name = baseplateName
315-
315+
316+
# group features in timeline
317+
plateGroup = des.timeline.timelineGroups.add(newCmpOcc.timelineObject.index, newCmpOcc.timelineObject.index + gridfinityBaseplateComponent.features.count + gridfinityBaseplateComponent.constructionPlanes.count + gridfinityBaseplateComponent.sketches.count)
318+
plateGroup.name = baseplateName
316319
except:
317320
args.executeFailed = True
318321
args.executeFailedMessage = getErrorMessage()

commands/commandCreateBin/entry.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -967,6 +967,9 @@ def generateBin(args: adsk.core.CommandEventArgs):
967967
else:
968968
shellUtils.simpleShell([topFace], binBodyInput.wallThickness, gridfinityBinComponent)
969969

970+
# group features in timeline
971+
binGroup = des.timeline.timelineGroups.add(newCmpOcc.timelineObject.index, newCmpOcc.timelineObject.index + gridfinityBinComponent.features.count + gridfinityBinComponent.constructionPlanes.count + gridfinityBinComponent.sketches.count)
972+
binGroup.name = binName
970973
except:
971974
args.executeFailed = True
972975
args.executeFailedMessage = getErrorMessage()

0 commit comments

Comments
 (0)