@@ -21,6 +21,7 @@ def __init__(self, inputs: adsk.core.CommandInputs, options):
2121
2222 self .widthInHp = adsk .core .IntegerSpinnerCommandInput .cast (self .inputs .itemById ("widthInHp" ))
2323 self .panelHeight = adsk .core .ValueCommandInput .cast (self .inputs .itemById ("panelHeight" ))
24+ self .sketchOnly = adsk .core .BoolValueCommandInput .cast (self .inputs .itemById ("sketchOnly" ))
2425 self .supportSolidHeight = adsk .core .ValueCommandInput .cast (self .inputs .itemById ("supportSolidHeight" ))
2526 self .supportShellHeight = adsk .core .ValueCommandInput .cast (self .inputs .itemById ("supportShellHeight" ))
2627 self .supportShellWallThickness = adsk .core .ValueCommandInput .cast (self .inputs .itemById ("supportShellWallThickness" ))
@@ -31,15 +32,18 @@ def __init__(self, inputs: adsk.core.CommandInputs, options):
3132 self .updateUiState ()
3233
3334 def updateUiState (self ):
35+ sketchOnly = self .sketchOnly .value
3436 supportTypeName = self .supportType .selectedItem .name
3537 supportTypeId = self .options .getIdForSupportTypeName (supportTypeName )
36- self .supportSolidHeight .isVisible = supportTypeId == "solid"
37- self .supportShellHeight .isVisible = supportTypeId == "shell"
38+ self .panelHeight .isVisible = not sketchOnly
39+ self .supportSolidHeight .isVisible = supportTypeId == "solid" and not sketchOnly
40+ self .supportShellHeight .isVisible = supportTypeId == "shell" and not sketchOnly
3841 self .supportShellWallThickness .isVisible = supportTypeId == "shell"
3942
4043 def updateOptionsFromInputs (self ):
4144 self .options .widthInHp = int (self .widthInHp .value )
4245 self .options .panelHeight = self .panelHeight .value
46+ self .options .sketchOnly = self .sketchOnly .value
4347 self .options .supportSolidHeight = self .supportSolidHeight .value
4448 self .options .supportShellHeight = self .supportShellHeight .value
4549 self .options .supportShellWallThickness = self .supportShellWallThickness .value
@@ -50,6 +54,7 @@ def updateOptionsFromInputs(self):
5054 def updateInputsFromOptions (self ):
5155 self .widthInHp .value = self .options .widthInHp
5256 self .panelHeight .value = self .options .panelHeight
57+ self .sketchOnly .value = self .options .sketchOnly
5358 self .supportSolidHeight .value = self .options .supportSolidHeight
5459 self .supportShellHeight .value = self .options .supportShellHeight
5560 self .supportShellWallThickness .value = self .options .supportShellWallThickness
@@ -105,6 +110,8 @@ def initializeInputs(self):
105110 for name in self .options .anchorPointNames :
106111 anchorPointDropdown .listItems .add (name , name == self .options .anchorPointName )
107112
113+ self .inputs .addBoolValueInput ("sketchOnly" , "Sketch only" , True , "" , self .options .sketchOnly )
114+
108115 supportGroup = self .inputs .addGroupCommandInput ("supportGroup" , "Reinforcement" )
109116 supportGroup .isExpanded = True
110117
0 commit comments