[fdo-users] RE: Autocad Map, FDO layer refresh
dfarina at geomap
damien.farina at wanadoo.fr
Tue Jun 19 04:12:04 EDT 2007
Hi, i've already tried your workaround, duplicated below.
In fact:
* Given a Mapguide 2007 session, I insert one polyline entity to a given
"FDO" table
* If I try to refresh another given map session, configured with the same
"FDO" table, the created entity doen't appear. If I right-click the layer in
the map tree and choose a refresh, then I can see my entity. As specified in
the Geospatial API, ForceRefresh forces a layer refresh after a map update,
as it seems to already work in Mapguide. My question is: how to force this
map update, without any intervention from the user?
Below your previous (maybe the right one?) solution & more details on my
Autocad configuration:
AutoCAD Map 3D 2008
B.51.0 (UNICODE)
<code_begin>
AcMapMap currentMap = AcMapMap.GetCurrentMap();
MgLayerCollection LayerCol = currentMap.GetLayers();
for (int i = 0; i < LayerCol.Count; i++)
{
MgLayerBase currentLayer = LayerCol.GetItem(i);
// AcMapLayer is derived from MgLayerBase
currentLayer.ForceRefresh();
}
<code_end>
Philipp Kast wrote:
>
> Hi
>
> There's a managed Map API which exposes a ForceRefresh in Map 2008.
>
> Then you can call:
>
> AcMapMap currentMap = AcMapMap.GetCurrentMap();
> foreach (MgLayerBase layer in currentMap.GetLayers())
> {
> layer.ForceRefresh();
> }
>
> The API is unsupported but it works...
>
> Philipp
>
> -----Original Message-----
> From: fdo-users-bounces at lists.osgeo.org
> [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of dfarina at geomap
> Sent: Monday, June 18, 2007 9:58 AM
> To: fdo-users at lists.osgeo.org
> Subject: [fdo-users] Autocad Map, FDO layer refresh
>
>
>
> Hi folks ;-)
>
> I'm a bit confused: how can i refresh an Autocad Map FDO layer (Oracle
> connection). I've searched in the Geospatial and other Autocad
> documentations, and i'm not able to find an exposed API for that. Is
> there a
> way to refresh the map as in Mapguide? The only way i've found is to
> remove/rebuild the corresponding layer, but it's not really a clean
> process!
>
> So if someone has already been confronted with that, and has a solution
> or
> have some resources to point me to... I know there's a way to force a
> layer
> refresh when a new map update is invoked (MgLayer ForceRefresh). How to
> force a map update?
>
> Thank you in advance
> --
> View this message in context:
> http://www.nabble.com/Autocad-Map%2C-FDO-layer-refresh-tf3938789s18162.h
> tml#a11171371
> Sent from the fdo-users mailing list archive at Nabble.com.
>
> _______________________________________________
> fdo-users mailing list
> fdo-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fdo-users
>
> _______________________________________________
> fdo-users mailing list
> fdo-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fdo-users
>
>
--
View this message in context: http://www.nabble.com/Autocad-Map%2C-FDO-layer-refresh-tf3938789s18162.html#a11190356
Sent from the fdo-users mailing list archive at Nabble.com.
More information about the fdo-users
mailing list