As when working with ArcFM features in VBA, ArcGIS for Desktop, or anywhere else, an ArcFM license is required to edit the features. In addition, when working outside of ArcMap it's a good idea to set the autoupdaters to server mode, which suppresses popups that cannot display outside of ArcMap, or turn off AUs entirely if the work doesn't require them. Attached are two Python scripts, a file referenced by them for the necessary enumerations, and a .dll which provide a means of doing this at 9.3.1 SP1 and up. You will also need to download the Python for Windows extensions, used for the dispatch operations that work with the ArcFM interop components. Be sure to use the 32-bit installer for the installed version of Python: 2.7 for ArcGIS 10.1 and 2.6 for ArcGIS 10.0 and 9.3/9.3.1.
ArcFMSample.py, enumerations.py, and Telvent.Samples.PythonInterop.dll are for 9.3.1 SP1. Place the .dll in the ArcFM Solution\bin directory, while enumerations.py should reside in the same directory as ArcFMSample.py. Edit the sample file to include your geoprocessing code in the designated location, changing the AU settings as well if desired. 9.3.1 SP2 does not require the .dll, it is installed with the product.
For ArcFM 10.0.1 and up should use ArcFMSampleUpdated.py instead. As with 9.3.1 SP2 the .dll file is no longer needed.
If using a version of ArcFM prior to 9.3.1 SP1 you will need to download and compile the source of the .dll file for that specific version, found in the attached Telvent.PythonSample.zip.
Attempting to edit a ArcFM feature in arcpy without an ArcFM license can result in the error "field is not editable". This error can also be seen when:
- ESRI Editor Tracking is enabled for the feature class
- feature geometry is invalid or null