Hello,
I "data connect" to MSSQL/Oracle spatial in Map 3D (using database views, I had to puzzle around a little bit to get it working: http://forums.autodesk.com/t5/AutoCAD-Map-3D-Developer/MSSQL-Oracle-Spatial-Refresh-cache-partially-...).
When I call AcMapLayer.ForceRefresh(pFeatureIds) for some of the layers, I get an exception:
"Can not update objects" (in German), AcMapVectorLayer.ForceRefresh line 1616 file AcMapVectorLayer.cpp.
The same code is working for most layers, but for some layers I get this exception. I don't see what's wrong with these layers.
All problematic layers have in common, that I use them to display "text only":
- All features are POINT features (no Z values)
- SimpleSymbolDefinition.Graphics = new[] { new Text { ... } }
- But that should be no problem, because refreshing the feature cache should have nothing to to with "text rendering", I think!?
The bevavior for MSSQL and Oracle is exactly the same (the structure of the database views and layers is the same -> same exception for the same layers).
Btw: AcMapLayer.ForceRefresh() (without explicitly specified IDs) works fine.
Any suggestions?
Markus
AcMapLayer.ForceRefresh(pFeatureIds) is an undocumented method, it is not recommanded to use undocumented methods, as it may change and we cannot provide support for that. Sorry about that!
Hi,
Is there any specific reason you want to use this internal / undocumented API AcMapLayer.ForceRefresh(pFeatureIds) ?
Thanks,
Partha
Hello,
I have to use this method for performance reasons: There are > 100000 rows per layer/feature class, and I want to refresh inserted/updated/deleted rows only (a complete refresh takes too much time).
Markus
Hi Markus,
I understand your requirement and I can log an API wish list for our Map 3D team to expose this internal API as public. However, using an undocumented / internal API is not encouraged as this would have been designed for a very specific case.
Thanks,
Partha
Ok. Once I log an API wish list I will share the wish list ID using the Case you have submitted to Autodesk support team.
Thanks,
Partha
Hi
I have now logged an API wish list for the same and forwarded it to our Map 3D engineering team for their consideration.
Thanks,
Partha