POST
|
Where can I find the indexID for a sdc? Or how can I create a file like this one below: <?xml version="1.0" encoding="utf-8" standalone="yes"?> <LookupDescriptor> <Type value="Lookup"/> <Name value="City"/> <Source indexID= "{06DBE7A0-CBC2-41C9-BBFD-643248413CEA}" path="cities.sdc" shapefield="SHAPE"/> <Inputs> <Input name="State/Prov." sequence="1" type="Filter" useWithSpatial="false"> <IndexField value="STATE"/> <LeftSourceField value="STATE"/> <RightSourceField value="STATE"/> </Input> <Input name="City" sequence="2" type="Name"> <IndexField value="NAME"/> <SourceFields value="NAME"/> </Input> </Inputs> <Labels> <Label type="Default" format="[NAME], [STATE]"/> </Labels> </LookupDescriptor> Thank you
... View more
03-31-2011
01:26 PM
|
0
|
1
|
1826
|
POST
|
I'm developing a Stand-a-lone query application using in vb .net visual studio 2008. The application processes about 10000 spatial queries. The problem I'm having is that approximately 8000 queries in, I am getting an error "Library not Registered". See below: System.Runtime.InteropServices.COMException (0x8002801D): Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)) at ESRI.ArcGIS.Geodatabase.ICursor.NextRow() The code I am running looks something like this: For i = 0 to x Dim cursor as ifeaturecursor = featureclass.search(queryfilter, true) Dim feature as ifeature = cursor.nextfeature Do until feature is nothing [record values of feature here] feature = cursor.nextfeature Loop ReleaseComObject(cursor) Next Usually the error will occur when I set the feature cursor to the result of featureclass.search (but only after I have used it many times), but it has also occurred on cursor.nextfeature. Any ideas what might be going on?
... View more
03-21-2011
01:17 PM
|
0
|
2
|
698
|
POST
|
You can use the following code. Set TransEvent to activate the listener. I did this in Sub SetListener_On, but you could do it on form load. Anyway after you set TransEvent every time the map scale changes the code will display your message box. To deactivate the listener, set TransEvent = nothing. Private WithEvents TransEvent As DisplayTransformation Public Sub SetListener_On() Dim pMxDoc As IMxDocument Set pMxDoc = Application.Document Set TransEvent = pMxDoc.ActiveView.ScreenDisplay.DisplayTransformation End Sub Private Sub TransEvent_VisibleBoundsUpdated(ByVal sender As IDisplayTransformation, ByVal sizeChanged As Boolean) If sizeChanged Then Dim pmxdocument As IMxDocument Dim pMap As IMap Set pMxDoc = Application.Document Set pMap = pMxDoc.FocusMap MsgBox "Map Scale = " & pMap.MapScale End If End Sub
... View more
06-28-2010
05:04 AM
|
0
|
0
|
252
|
POST
|
woops simple mistake, sorry After you set pMxDoc do this: Dim pMap as IMap Set pMap = pMxDoc.FocusMap
... View more
06-24-2010
07:10 AM
|
0
|
0
|
683
|
POST
|
Private Sub UIToolControl2_MouseDown(ByVal button As Long, ByVal shift As Long, ByVal x As Long, ByVal y As Long) Dim pMxDoc As IMxDocument Set pMxDoc = Application.Document Dim pMxApp As IMxApplication Set pMxApp = Application Dim pPoint As IPoint Set pPoint = pMxApp.Display.DisplayTransformation.ToMapPoint(x, y) Dim env As ISelectionEnvironment pMap.SelectByShape pPoint, env, False pMxDoc.ActivatedView.PartialRefresh esriViewGeoSelection, Nothing, Nothing End Sub You might need to buffer the point if you're selecting line or point features. To do that: Dim pTopoOp as ITopologicalOperator Dim bufferDistance as Long (I suggest you use something like 0.005 * pMap.MapScale) Set pTopoOp = pPoint pMap.SelectByShape pTopoOp.Buffer(bufferDistance), env, False
... View more
06-23-2010
07:07 AM
|
0
|
0
|
683
|
POST
|
Dim pUID As New UID Dim pCmdItem As ICommandItem pUID.value = "{AB073B49-DE5E-11D1-AA80-00C04FA37860}" pUID.SubType = 3 Set pCmdItem = Application.Document.CommandBars.Find(pUID) pCmdItem.Execute
... View more
06-10-2010
11:57 AM
|
0
|
0
|
317
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|