Is This Content Helpful?
We're glad to know this article was helpful.
This article provides sample Avenue code that splits a polygon feature using a selected line from a different theme.
theView = av.GetActiveDoc
t = theView.GetThemes
splitTheme = msgbox.choice(t,"","Choose the line theme with the selected line")
theProjection = theView.GetProjection
theFtab = splitTheme.GetFTab
theShapeField = theFtab.FindField("Shape")
thebit = theFtab.GetSelection
for each x in thebit
aShape = theFtab.ReturnValue(theShapeField, x)
if (theProjection.IsNull) then
aGraphic = GraphicShape.Make(aShape.ReturnProjected(theProjection))
aGraphic = GraphicShape.Make(aShape)
if (aShape.Is(Polygon)) then
msgbox.info("You must choose a line theme","Warning")
theTheme = theView.GetEditableTheme
if (theTheme <> nil) then
theField = theTheme.GetFTab.FindField("Shape")
theType = theField.GetType
if ((theType = #FIELD_SHAPEPOLY) or (theType = #FIELD_SHAPELINE)) then