HOW TO
When creating a shapefile from an active theme, ArcView gives you the option to add the shapefile to the current view; however, it doesn't give you the option to add a newly-converted shapefile to a different view. This document explains how to customize ArcView to have that option.
Code:
'-- make a list of views
dl = {}
for each d in av.GetProject.GetDocs
if (d.Is(View)) then
dl.Add(d)
end
end
'-- provide a choice for a new view
dl.Add("<New View>")
AddToView = MsgBox.ListAsString(dl,"Add Theme to:", "Convert to Shapefile")
if (AddToView <> nil) then
if (AddToView = "<New View>") then
AddToView = View.Make
AddToView.GetWin.Open
end
'-- create a theme and add it to the specifiedView
fthm = FTheme.Make(anFTab)
AddToView.AddTheme(fthm)
'bring the View to the front
AddToView.GetWin.Activate
end
Warning:
The shapefile will be added to the specified view as well as to the current view. In order to add the shapefile to only the specified view, delete the following lines from the source code
Code:
'-- create a theme and add it to the View
fthm = FTheme.Make(anFTab)
theView.AddTheme(fthm)
Article ID:000002696
Get help from ArcGIS experts
Download the Esri Support App