AnsweredAssumed Answered

Why are some items missing from intellisense?

Question asked by chaz6 on Oct 3, 2014
Latest reply on Oct 8, 2014 by chaz6

When creating python scripts, I find that there items missing from the intellisense popups in the Python window. I also see that the same items are missing when examining an object with dir().

 

For example:-

 

cursor = arcpy.SearchCursor("My Feature Class")
row = cursor.next()
dir(row)
['__class__', '__cmp__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattr__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__passthrough_to_ao__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_arc_object', '_go', 'getValue', 'isNull', 'setNull', 'setValue']

dir(row.SHAPE)
['JSON', 'WKB', 'WKT', '__add__', '__class__', '__cmp__', '__delattr__', '__dict__', '__doc__', '__format__', '__from_scripting_arc_object__', '__geo_interface__', '__getattribute__', '__hash__', '__init__', '__iter__', '__module__', '__new__', '__or__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__sub__', '__subclasshook__', '__type_mapping__', '__type_string__', '__weakref__', '__xor__', '_arc_object', '_fromGeoJson', '_go', '_passthrough', 'area', 'boundary', 'buffer', 'centroid', 'clip', 'contains', 'convexHull', 'crosses', 'cut', 'difference', 'disjoint', 'distanceTo', 'equals', 'extent', 'firstPoint', 'getArea', 'getLength', 'getPart', 'hullRectangle', 'intersect', 'isMultipart', 'labelPoint', 'lastPoint', 'length', 'length3D', 'measureOnLine', 'overlaps', 'partCount', 'pointCount', 'positionAlongLine', 'projectAs', 'queryPointAndDistance', 'snapToLine', 'spatialReference', 'symmetricDifference', 'touches', 'trueCentroid', 'type', 'union', 'within']

Note that SHAPE is missing from the output of dir(row). In the intellisense popup it shows getValue, isNull, setNull, setValue, but not SHAPE.

 

This makes it a bit more difficult when writing scripts as I have to remember that the object is missing.

Outcomes