Arcmap export select By Graphics with query

المشرف العام

Administrator
طاقم الإدارة
I use select By Graphics then I use this code to see what I can exportbut it don't work 100% it export Sample Line-40 and Line-40 is not in the area I select By Graphics can anyone help me with this so I don't export empty file and export what I select something is missing

test_query("1", "LINE-30", "30")Public Sub exxiexport(ByVal valid)

Case "LINE-30" Chk_LINE-30.ForeColor = Color.RoyalBlue End SelectEnd SubPublic Sub test_query(ByVal ep_layer, ByVal ep_type_name, ByVal ep_query)

Dim pDoc As IMxDocument Dim pMap As IMap Dim pFLayer As IFeatureLayer Dim pFc As IFeatureClass Dim pINFeatureClassName As IFeatureClassName Dim pDataset As IDataset Dim pInDsName As IDatasetName Dim pFSel As IFeatureSelection Dim pSelSet As ISelectionSet pDoc = My.ArcMap.Document pMap = pDoc.FocusMap pFLayer = pMap.Layer(ep_layer) pFc = pFLayer.FeatureClass 'Get the FcName from the featureclass pDataset = pFc pINFeatureClassName = pDataset.FullName pInDsName = pINFeatureClassName pFSel = pFLayer Dim pQFilter As IQueryFilter pQFilter = New QueryFilter pQFilter.WhereClause = "TYPE = '" & ep_query & "'" pFSel.SelectFeatures(pQFilter, esriSelectionResultEnum.esriSelectionResultAnd, False) pSelSet = pFSel.SelectionSet If pSelSet.Count = 0 Then exxiexport(ep_type_name) 'Change checkbox color Exit Sub End IfEnd Sub

أكثر...
 
أعلى