POST
|
Im not the expert to tell for sure but it seems to me that your problem is because ArcObjects are based on STA - Single threaded Appartment architerture.
... View more
10-01-2013
01:13 PM
|
0
|
0
|
331
|
POST
|
Idea was to use some WIN API to force redrawing the window by using HWND of window. http://msdn.microsoft.com/en-us/library/windows/desktop/dd145002(v=vs.85).aspx But I searched a bit through the ArcObjects and it seems to me that using ITabeWIndow you just redraw window but your problem is not the window object itself but data inside window. Data object is presented through TableView, try to get to the ITableControl and call method RemoveAndReloadCache - Lose cache, so the table window is current with the underlying database. http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/ITableControl3_Interface/002900000056000000/ Hope this hint will be helpfull to you. Regards, Dubravko
... View more
10-01-2013
12:21 PM
|
0
|
0
|
276
|
POST
|
Can you check if the object tableWindow it self contains right data, but the content on the screen is not refreshed, for forcing to refresh HWND. I had this problem once, and left it as is, minor benefit for spending a lot of time to solve it.
... View more
09-25-2013
12:53 AM
|
0
|
0
|
276
|
POST
|
You don't have to make the progress dialog public. All you need to do is declare it outside of the Try/Catch. Or hide it in finally statement.
... View more
01-04-2013
04:25 AM
|
0
|
0
|
391
|
POST
|
It seems that there is really another leak in AO implementation. Releasing COM using different approach will not help, seem like useless effort. I suggest that you define number of objects you would display on screen. Prefetch them and create your own pool of objects you work with and move them around the map. Lets hope memory leak is just in part of releasing Graphictracker but there could also be in releasing of handles on screen DC. Second one you would easy test in continually calling screen refresh - repaint. If you isolate leak more closely you'll easily make work around. Hope this idea is helpful to you. Regards, Dubravko
... View more
01-03-2013
12:41 AM
|
0
|
0
|
220
|
POST
|
Use StartDrawing and FinishDrawing only once, maybe before and after the while statement. For each StartDrawing you have overhed of creating copy of screen device context. 1. Invisible features are all coordinates outside of map extent 2. Screen caching is not so trivial task, I'm not sure if I can make good hint. 3. ArcObjects are not multi threading keep in mind for syncing, drawing is performed on device context and that is a single thread operation.
... View more
12-31-2012
12:04 AM
|
0
|
0
|
120
|
POST
|
I tested on ArcMap 10.0 SP4, WinXP. If you need help about some implementation let me know on private, to help you in my spare , night :cool:, time. Regards Dubravko
... View more
11-25-2012
10:53 PM
|
0
|
0
|
921
|
POST
|
Dave, I tested your code and I'm sure that in ESRI imeplementation of IDataStatistics or in combination with IEnumerator is a memory leak. I separated AO logic from form object and after looping 10000 times in FeatureClass with 1500 features I had 300Mb RAM memory less. Isn't so bad if you do it once or twice but in some SOE implementation will be some nasty experience. I run same loop with normal Cursor and there is no problem but you can make this analysis of unique value in Db or you can make your own implementation using System.Data.DataTable object or you can make your own and you'll be sure that you don't have this leaks. Sorry for bad news but same on my side. Hope ESRI will do something about it in a reasonable time. Regards, Dubravko
... View more
11-25-2012
10:21 PM
|
0
|
0
|
921
|
POST
|
Use IGpsFeed.TestStatus to see what it returns. Just one simple idea: - do you have signal if you are using it in the office. - maybe your GPS haven't fixed on satellite if it has a weak signal. Test output of GPS with some SerialPort monitor or if you have NMEA parser, and find by hand tag that holds coordinates. Be sure that you have valid baudrate before using it with AO, some OEM GSP modules are by default at 4800. Regards
... View more
11-22-2012
10:39 PM
|
0
|
0
|
323
|
POST
|
Read your code and i have some hints. Use FeatureClass.Search with Cursor recycling Release object after use with ReleaseComObject rather then FinalRelease http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Releasing_COM_references/0001000004tm000000/ If you run a lot of iteration with enum without using Recycling you can waste a lot of memory. Try this wit enclosing your loop in try catch and while running look monitor you system memory. Hope this helps. Sorry don't have time to do some testing on my side but will try to do that next week. Regards, Dubravko
... View more
11-22-2012
03:51 AM
|
0
|
0
|
921
|
POST
|
Didn't try but in VS add this Oracle.ManagedDataAccess.dll reference by browse. Set Copy to output directory. Verify if it runs ok. It looks to me that is t should work, like with log4net.dll 🙂 Don't deploy your AddIn by AddInManager but, by hand, by copying it in well known locations like C:\Program Files\ArcGIS\Desktop10.0\Bin\Addins\ with Oracle.ManagedDataAccess.dll Please try and let us know does it hold water. Regards Dubravko
... View more
11-21-2012
04:42 AM
|
0
|
0
|
410
|
POST
|
Seems to me that you have invalid geometry. Found these features and check if the are Simple ITopologicalOperator.IsSimple http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/d/002m000003vt000000.htm ITopologicalOperator.Simplify http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//002m000003w0000000 After Simplify you can set it using ITopologicalOperator2.IsKnownSimple_2 http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/IsKnownSimple_Property/002m000003tn000000/ It should be something like this. IGeometry igPairLine = (IGeometry)ipPairLine; ITopologicalOperator pTopOp = igPairLine as ITopologicalOperator; pTopOp.Simplify(); IRelationalOperator relOperatore = (IRelationalOperator)gbBaseMap; If this doesn't help you should set IsKnownSimple to false prior Simplifying. IGeometry igPairLine = (IGeometry)ipPairLine; ITopologicalOperator2 pTopOp = igPairLine as ITopologicalOperator2; pTopOp.IsKnownSimple_2 = false; pTopOp.Simplify(); IRelationalOperator relOperatore = (IRelationalOperator)gbBaseMap; Regards, Dubravko
... View more
11-18-2012
03:09 AM
|
0
|
0
|
237
|
POST
|
Finally got it to work correctly. It was easy to add new table but it was at first hard to figure out how to activate existing table. But the cathc is in pTableWindow.Application = ArcMap.Application; If you look you will se that we got existing ITableWindows that had defined Application property and therefore show will not add them to existing ITableWindows but will reference to existing ITableWindow and make it visible. Change variable names if you like and enjoy! IFeatureLayer pFeatureLayer = FindLayer("LayerName");
ITableWindow pTableWindow = new TableWindowClass();
ITableWindow pTW_Layer = pTableWindow.FindViaFeatureLayer(pFeatureLayer, true);
// windows not open if null
if (pTW_Layer == null)
{
// Create TableWindow and add to Application
ITableWindow pTableWindow = new TableWindowClass();
pTableWindow.FeatureLayer = pFeatureLayer;
pTableWindow.Application = ArcMap.Application;
pTableWindow.Show(true);
return;
}
else
{
// version 1
if (!pTW_Layer.IsVisible)
pTW_Layer.Show(true);
return;
// version 2
ITableWindow3 pTableWindow3 = pTableWindow as ITableWindow3;
ESRI.ArcGIS.esriSystem.ISet pTableSet = new ESRI.ArcGIS.esriSystem.SetClass();
pTableWindow3.FindOpenTableWindows(out pTableSet);
pTableSet.Reset();
ITableWindow pTableWindowTemp = pTableSet.Next() as ITableWindow;
while (pTableWindowTemp != null)
{
if (pTableWindowTemp.FeatureLayer.FeatureClass.FeatureClassID ==
pFeatureLayer.FeatureClass.FeatureClassID)
{
if (!pTableWindowTemp.IsVisible)
pTableWindowTemp.Show(true);
return;
}
pTableWindowTemp = pTableSet.Next() as ITableWindow;
}
}
... View more
11-18-2012
02:48 AM
|
0
|
0
|
374
|
POST
|
Tried to find solution for you. I think solution is in
ITableDockWindowAdmin pTabWindowAdmin = new TableDockWindowClass();
pTabWindowAdmin.Show(ITableWindow, bool) but ITableDockWindowAdmin keeps me bringing exception. I must be missing some initialization class. I managed to open Table dialog: IFeatureLayer pFeatureLayer = FindLayer("LayerName");
ITableWindow pTW = new TableWindowClass();
ITableWindow pTW_Layer = pTW.FindViaFeatureLayer(pFeatureLayer, true);
// windows not open if null
if (pTW_Layer == null)
{[INDENT]// Open datatable in Table window
[/INDENT]
[INDENT]ITableWindow pTableWindow = new TableWindowClass();
pTableWindow.FeatureLayer = pFeatureLayer;
pTableWindow.Application = ArcMap.Application;
if (!pTableWindow.IsVisible)
[/INDENT]
[INDENT=2]pTableWindow.Show(true);
[/INDENT]
[INDENT]return;
[/INDENT]
} Tried with Win32APi but no luck, not responding properly to the SetWindowPos and ShowWindow API. Hopefully someone would had more ideas to solve this problem. Regards Dubravko
... View more
11-17-2012
03:30 PM
|
0
|
0
|
374
|
Title | Kudos | Posted |
---|---|---|
1 | 08-19-2011 04:59 PM | |
1 | 08-07-2011 10:40 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|