Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions commands/showUnderconstrained/entry.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import adsk.core
import adsk.fusion
import os
from ...lib import fusionAddInUtils as futil
from ... import config
Expand Down Expand Up @@ -74,5 +75,10 @@ def stop():
def command_created(args: adsk.core.CommandCreatedEventArgs):
# General logging for debug.
# futil.log(f"{CMD_NAME} Command Created Event")

app.executeTextCommand("sketch.showunderconstrained")
sketch = adsk.fusion.Sketch.cast(app.activeEditObject)
if not sketch:
ui.messageBox("There is no sketch currently being edited.")
elif sketch.isFullyConstrained:
ui.messageBox("The current sketch is fully constrained.")
else:
app.executeTextCommand("sketch.showunderconstrained")