This is a silly question, but I have this code snippet that I can't figure out:
'Define a calculator for NewArea field pCalculator = New Calculator With pCalculator .Cursor = pCursor .PreExpression = "Dim dbarea as double" & vbCrLf _ & "Dim pArea as IArea" & vbCrLf _ & "Set pArea = [Shape]" & vbCrLf _ & "dbArea = pArea.area" .Expression = "dbArea" .Field = "NewArea" End With 'Calculate the field values of NewArea field pCalculator.Calculate()
What is pCalculator calculating here? What is [Shape] in this context? I'm migrating this old VBA code to Python, and I'm stuck at this segment. Thanks in advance.
A more general question, what is the significance of the square brackets in the pre-expression? Are they placeholders for the expression?