Autocad Map, FDO layer refresh

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Autocad Map, FDO layer refresh

dfarina@geomap

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
Reply | Threaded
Open this post in threaded view
|

RE: Autocad Map, FDO layer refresh

Philipp Kast
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: [hidden email]
[mailto:[hidden email]] On Behalf Of dfarina@geomap
Sent: Monday, June 18, 2007 9:58 AM
To: [hidden email]
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
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users

_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users
Reply | Threaded
Open this post in threaded view
|

RE: Autocad Map, FDO layer refresh

gisbradokla
In reply to this post by dfarina@geomap


Not sure about through the api. but in GUI go to the map display tab in the
Task pane. or display manager in 2008. and select the layer you want to
refresh and right click.
I'm not at my install right now or I would try to find out what the actual
command is.

Brad

>>>
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.html#a11171371
Sent from the fdo-users mailing list archive at Nabble.com.

_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users

_________________________________________________________________
Need a break? Find your escape route with Live Search Maps.
http://maps.live.com/default.aspx?ss=Restaurants~Hotels~Amusement%20Park&cp=33.832922~-117.915659&style=r&lvl=13&tilt=-90&dir=0&alt=-1000&scene=1118863&encType=1&FORM=MGAC01

_______________________________________________
fdo-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-users
Reply | Threaded
Open this post in threaded view
|

RE: Autocad Map, FDO layer refresh

dfarina@geomap
In reply to this post by Philipp Kast


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@lists.osgeo.org
[mailto:fdo-users-bounces@lists.osgeo.org] On Behalf Of dfarina@geomap
Sent: Monday, June 18, 2007 9:58 AM
To: fdo-users@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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/fdo-users

_______________________________________________
fdo-users mailing list
fdo-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/fdo-users
Reply | Threaded
Open this post in threaded view
|

RE: Autocad Map, FDO layer refresh

dfarina@geomap
In reply to this post by gisbradokla

Thk u for your response. You're right, that's the exact behaviour I would like to reproduce by code. ForceRefresh activates a layer update after the user (or an event?) has activated a map update, as it is described in the documentation.

So the problems remains the same: how to force a map update by code? Is there an exposed Geospation API (or maybe an Object ARX solution)?




bradgisoklah wrote

Not sure about through the api. but in GUI go to the map display tab in the
Task pane. or display manager in 2008. and select the layer you want to
refresh and right click.
I'm not at my install right now or I would try to find out what the actual
command is.

Brad

>>>
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.html#a11171371
Sent from the fdo-users mailing list archive at Nabble.com.

_______________________________________________
fdo-users mailing list
fdo-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/fdo-users

_________________________________________________________________
Need a break? Find your escape route with Live Search Maps.
http://maps.live.com/default.aspx?ss=Restaurants~Hotels~Amusement%20Park&cp=33.832922~-117.915659&style=r&lvl=13&tilt=-90&dir=0&alt=-1000&scene=1118863&encType=1&FORM=MGAC01

_______________________________________________
fdo-users mailing list
fdo-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/fdo-users