|
POST
|
Have you considered using ArcSDE? Maybe try SqlServer with SDEBINARY option.
... View more
05-21-2010
05:21 AM
|
0
|
0
|
705
|
|
POST
|
I've never tried it, but maybe IDatasetContainer3.AddDataset
... View more
05-20-2010
12:30 PM
|
0
|
0
|
324
|
|
POST
|
Have you tried IGeometryBridge.QuerySegments ? One of the design goals of IGeometryBridge is to improve performance. http://resources.esri.com/help/9.3/arcgisengine/dotnet/b0e79fb3-ee12-4cbc-a31f-60f1eb4a4861.htm
... View more
05-20-2010
09:06 AM
|
0
|
0
|
705
|
|
POST
|
Careful with FinalReleaseCOMObject though. What might not be apparent is that if the same featureclass is opened in two different places, calling FinalReleaseComObject on one variable can cause an "object disconnected from its underlying com object" exception when the other variable is used. ReleaseComObject just decrements by one, so no exception is thrown. Code below prints "same object". try
{
IFeatureWorkspace fws = (IFeatureWorkspace)OpenWS(@"D:\Projects\SAWS\data\March02Test1.gdb");
IFeatureClass fc1 = fws.OpenFeatureClass("SAWS_ADDRESSES");
IFeatureClass fc2 = fws.OpenFeatureClass("SAWS_ADDRESSES");
if (fc1 == fc2)
Debug.Print("same object");
else
Debug.Print("different object");
//Marshal.FinalReleaseComObject(fc1);
Marshal.ReleaseComObject(fc1);
Debug.Print("{0} records", fc2.FeatureCount(null));
}
catch (Exception ex)
{
Debug.Print(ex.Message);
}
Apparently ComReleaser calls FinalReleaseComObject when it disposes: try
{
IFeatureWorkspace fws = (IFeatureWorkspace)OpenWS(@"D:\Projects\SAWS\data\March02Test1.gdb");
IFeatureClass fc1 = fws.OpenFeatureClass("SAWS_ADDRESSES");
using (ComReleaser comReleaser = new ComReleaser())
{
IFeatureClass fc2 = fws.OpenFeatureClass("SAWS_ADDRESSES");
if (fc1 == fc2)
Debug.Print("same object");
else
Debug.Print("different object");
comReleaser.ManageLifetime(fc2);
Debug.Print("{0} records", fc2.FeatureCount(null));
}
// next line throws exception ...
Debug.Print("{0} records", fc1.FeatureCount(null));
}
catch (Exception ex)
{
Debug.Print(ex.Message);
} This might be a hard bug to track down. I've never seen a case where failure to releasecomobject on a featureclass causes problems, so maybe releasing is not worth the risk.
... View more
05-19-2010
07:12 PM
|
0
|
0
|
1438
|
|
POST
|
Not sure, might be worth trying these (or combinations thereof): IViewManager.DelayBackgroundDraw = true IViewRefresh.ProgressiveDrawing = true
... View more
05-18-2010
06:42 AM
|
0
|
0
|
662
|
|
POST
|
If you go with a plugin datasource, you can use Featurelayers to display your data, so all the tools (except for editing tools) that work with featurelayers will work a featurelayer that uses your plugin. (Attribute tables, Identify, Data export etc.) If use of these OOTB featurelayer tools is not important, I'd go with a inheriting BaseCustomLayer. Another option might be inheriting from FeaturelayerClass, I played around with this a bit and have seen threads of others doing this too, but I've never thoroughly tested it.
... View more
05-18-2010
05:52 AM
|
0
|
0
|
523
|
|
POST
|
I also suspect there's a way of telling it not to, but I can't seem to find it I'd try using Spy++ to figure out what window is blocking the WM_MOUSEWHEEL message then subclassing that window to block the message. (I suspect it will be the ScreenDisplay's hWnd). http://support.microsoft.com/kb/815775 When you receive the message you may want to call IScreenDisplayZoom methods. I thought this is what the map does by default anyway, but maybe not.
... View more
05-18-2010
05:41 AM
|
0
|
0
|
662
|
|
POST
|
see also http://forums.esri.com/Thread.asp?c=93&f=993&t=204326#613219
... View more
05-14-2010
01:24 PM
|
0
|
0
|
796
|
|
POST
|
Have you tried calling ISecureLayer2.ClearPassword before saving the mxd (or .lyr file)?
... View more
05-14-2010
11:38 AM
|
0
|
0
|
444
|
|
POST
|
I implemented a plugin datasource for a project for vehicle tracking. The samples lead you to think the data needs to be on disk, but we got it to use an in memory list of vehicles. So while you can't use the editor to edit a plugin datasource, you can have tools that change the data. Installation of plugins is a bit tricky, remembering to re-register the PluginWorkspaceFactory dll is a common source of pain. A plug-in workspace factory helper should be registered in the component category ESRI PlugIn Workspace Factory Helpers. PlugInWorkspaceFactory.dll should then be reregistered (this file is found in the ArcGIS installation bin folder). This reregistration will register the CLSID returned by WorkspaceFactoryTypeID in the ESRI Workspace Factories and ESRI Gx Enabled Workspace Factories categories. http://resources.esri.com/help/9.3/arcgisengine/dotnet/f4ce6eb3-606c-4aa1-a7ba-28abaa81f930.htm#ImplementingWSFactoryHelper A major annoyance for me is the COMException you're required to throw: Implementation of NextRecord must raise an error if there are no more rows to fetch. Hopefully this has changed for 10.0, but I haven't checked.
... View more
05-14-2010
07:57 AM
|
0
|
0
|
523
|
|
POST
|
I never can remember the properties ... nor where to find them in the documentation. So sometimes what I do is set up a connection in ArcCatalog, select it in the treeview, then run vba code that lists the properties, then write .NET code that sets those properties. It's doing things like this that makes me worry about life without VBA. Option Explicit
Sub ListConnProps()
Dim pGxApp As IGxApplication
Set pGxApp = Application
If Not TypeOf pGxApp.SelectedObject Is IGxDatabase Then
Debug.Print "select a geodb first"
Exit Sub
End If
Dim pGXdb As IGxDatabase2
Set pGXdb = pGxApp.SelectedObject
Dim names As Variant, values As Variant
Debug.Print pGXdb.WorkspaceName.WorkspaceFactoryProgID
pGXdb.WorkspaceName.ConnectionProperties.GetAllProperties names, values
Dim l As Long
For l = 0 To UBound(names)
Debug.Print names(l), values(l)
Next l
End Sub
... View more
05-13-2010
10:58 AM
|
0
|
0
|
1675
|
|
POST
|
see http://forums.esri.com/Thread.asp?c=93&f=993&t=161969&g=1#474431
... View more
05-12-2010
02:46 PM
|
0
|
0
|
2287
|
|
POST
|
Hey Neil - Thanks for responding. This is helpful. I'm starting to see how this would be a hard thing to track down. I guess instead of keeping a reference to the IFeature, I could hang onto its' OID, then have a method in the DAL that: puts the BO's into a Dictionary<int,BO> Gets a cursor by passing the array of Dictionary keys to IGeoDatabaseBridge2.GetFeatures loops through the cursor, synching each feature with Dictionary[IFeature.oid] Release feature Release Cursor
... View more
05-12-2010
02:42 PM
|
0
|
0
|
1438
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-17-2015 10:41 AM | |
| 2 | 11-15-2012 05:22 AM | |
| 4 | 09-29-2011 08:20 AM | |
| 3 | 12-04-2015 08:50 AM | |
| 1 | 04-08-2010 09:34 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:22 AM
|