I have a Feature Class and a Table and a Relationship Class relating them via GlobalID
I want to write to the Feature Class (geometry and a couple attributes)
I also want to write to the related table (few attributes)
Are there any simple examples of how to write to them via arcPy?
I can write to the Feature Class like the below BUT how do I write to the related Table at the same time?
workspace <SPAN class="operator token">=</SPAN> r<SPAN class="string token">"E:/ArcGISProjects/CountySelection/cccc.sde"</SPAN>
edit <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>da<SPAN class="punctuation token">.</SPAN>Editor<SPAN class="punctuation token">(</SPAN>workspace<SPAN class="punctuation token">)</SPAN>
<SPAN class="comment token"># Edit session is started without an undo/redo stack for versioned data</SPAN>
<SPAN class="comment token"># (for second argument, use False for unversioned data)</SPAN>
edit<SPAN class="punctuation token">.</SPAN>startEditing<SPAN class="punctuation token">(</SPAN><SPAN class="token boolean">False</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="token boolean">False</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">print</SPAN> <SPAN class="string token">"edit started"</SPAN>
<SPAN class="comment token"># Create update cursor</SPAN>
<SPAN class="keyword token">with</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>da<SPAN class="punctuation token">.</SPAN>InsertCursor<SPAN class="punctuation token">(</SPAN>inputFeatureclass<SPAN class="punctuation token">,</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="string token">'SHAPE@'</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'ADDRESSgeocode'</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'DISTANCEparameter'</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'UNIQUEIDparameter'</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'COUNTYLIST'</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'ID'</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="keyword token">as</SPAN> cursor<SPAN class="punctuation token">:</SPAN>
<SPAN class="comment token"># Start an edit operation</SPAN>
edit<SPAN class="punctuation token">.</SPAN>startOperation<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="comment token"># Perform edits</SPAN>
<SPAN class="comment token">## CREATE THE NEW MULTI PART POLYGON IN THE FC</SPAN>
cursor<SPAN class="punctuation token">.</SPAN>insertRow<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">[</SPAN>geometries<SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">,</SPAN> searchAddress<SPAN class="punctuation token">,</SPAN> searchDistance<SPAN class="punctuation token">,</SPAN> searchid<SPAN class="punctuation token">,</SPAN> txt_list<SPAN class="punctuation token">,</SPAN> validGuid<SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="comment token">## Delete cursor object</SPAN>
<SPAN class="keyword token">del</SPAN> cursor
<SPAN class="comment token"># Stop the edit operation.</SPAN>
edit<SPAN class="punctuation token">.</SPAN>stopOperation<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="comment token"># Stop the edit session and save the changes</SPAN>
edit<SPAN class="punctuation token">.</SPAN>stopEditing<SPAN class="punctuation token">(</SPAN><SPAN class="token boolean">True</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">print</SPAN> <SPAN class="string token">"edit ended"</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>