HOW TO
This document provides an Avenue example of how to spilt a polygon feature with a user-defined polygon.
Code: theView = av.GetActiveDoc theTheme = theView.GetEditableTheme theFTab = theTheme.GetFTab shpFld = theFTab.FindField("Shape") thePoly = theView.ReturnUserPolygon if (thePoly.IsNull) then return nil else if (theTheme <> nil) then thePolyLine = PolyLine.Make({thePoly.AsList.Get(0)}) theTheme.SelectByShapes({thePoly},#VTAB_SELTYPE_NEW) theFtab.BeginTransaction for each rec in theFTab.GetSelection p = theFTab.ReturnValue(shpfld, rec) pl = thePolyline.LineIntersection(p) if (pl.CountParts > 1) then pl = pl.ReturnConnected end theTheme.Split(pl) end theFtab.EndTransaction theTheme.Invalidate(true) av.GetProject.SetModified(true) end end
Note: For more information, refer to the ArcView Help topic "Customize (dialog box)."
Get help from ArcGIS experts
Download the Esri Support App