isValueError property no longer working

isValueError property no longer working

SendItCNC
Advocate Advocate
220 Views
1 Reply
Message 1 of 2

isValueError property no longer working

SendItCNC
Advocate
Advocate

Looks like the isValueError property on StringValueCommandInput is no longer having the desired effect when set to True from the inputChanged handler (should be that input field turns red and ok button is disabled). Was working before. Anybody else?

 

-Dave

0 Likes
221 Views
1 Reply
Reply (1)
Message 2 of 2

SendItCNC
Advocate
Advocate
Here's the relevant code from the inputChanged handler...
 
 
 
app = adsk.core.Application.get()
document = app.activeDocument
design = document.products.itemByProductType( 'DesignProductType' )
unitsMgr = design.unitsManager

 

if changed_input.id == 'strId':
    if unitsMgr.isValidExpression(changed_input.value, unitsMgr.defaultLengthUnits):
         realValue = unitsMgr.evaluateExpression(changed_input.value, unitsMgr.defaultLengthUnits)
    else:
         changed_input.isValueError = True
0 Likes