Hello all, can somebody please help me get going with Python Expressions/PreExpressions in the ICalculator from within my .net-code. I can successfully run Python and VBScript from the Calculator in the Desktop User Interface. I can also successfully run the simple VBScript Expression Dim pCalc As GeoDatabaseUI.ICalculator = New GeoDatabaseUI.Calculator()
pCalc.Expression = "[FID] * 2" from within my code using the Calculator. However, if I try the Python-Expression Dim pCalc As GeoDatabaseUI.ICalculator = New GeoDatabaseUI.Calculator()
pCalc.Expression = "!FID! * 2" I get the "General error executing calculator" and an Exception "Error HRESULT E_FAIL has been returned from a call to a COM component". However, as I said, this Python-Expression runs fine in the Calculator User Interface. My suspicion is that maybe the parser doesn't notice that it is receiving a Python-Expression. Do I have to - and if yes, where - programmatically switch the parser of the ICalculator to Python? What am I missing? Florian.
... View more