阅读:1745回复:1
用MapControl控件怎样实现要素的选择??所用语言:______vb__________________(vba,vb,vc等) 所涉及控件:____MapControl___________________ 所涉及主题:___________Ao_____________(vba可填写Top ArcObjects:根据Exploring Ao) 具体想实现的功能:___要素选择___________________ 备注和注意事项:____当选中某要素时,可高亮度显示;且可连续选择多要素。 目前以下代码已可实现划框,但无法选中 所用程序:_ Set pMapCommand = m_pMapCommandCollection.Item(Tool.Name) If Not pMapCommand Is Nothing Then If TypeOf pMapCommand Is esriCore.ITool Then If pMapCommand Is FormMain.MapControlMain.CurrentTool Then Tool.Checked = False Set FormMain.MapControlMain.CurrentTool = Nothing Else Tool.Checked = True Set FormMain.MapControlMain.CurrentTool = pMapCommand End If End If End If MapControlMain.Refresh_________________ |
|
1楼#
发布于:2004-12-31 10:59
强烈支持楼主的发贴方式!在arcgis83的开发包里有个例子 下面是这个例子的下载地址: http://arcobjectsonline.esri.com/ArcObjectsOnline/Samples/ArcMap/Selection/Selection%20Dialog/SelectionDialog.zip 不知道你看了没? Description: This sample's command button displays a tabbed dialog that allows the user to perform feature selections based on Class, Attribute and Spatial extents. The spatial extents can either be digitized by the user using a number of tools, or extracted from features in the map. 不过需要你转换到mapcontrol [此贴子已经被作者于2004-12-31 11:00:00编辑过] |
|
|