i have a question concerning Display Manager in Map 3 D 2012. I loaded a layer with a WMS datasource. If the layer is loaded, you can click with right mouse button and activate the function resample raster. How can i do this programatically with NET API?
Unfortunately, there is not such .NET API to do that.
I searched in our knowledge base and find following an unsupported OjectARX API call QueryToView in AcMapDMGisGridElement to implement the resample operation. However this kind of API is not exposed with .NET API, so you need to use PInvoke to wrap it to .Net.
Here is a code snippet for your reference.
/// Update this grid element according to current viewport.
/// Returns Acad::eOk if successful; otherwise, returns a different error code.
SmartTransaction xaction(m_id.database());//m_id :given the object Id of the image
if(Acad::eOk == xaction.getObject(pGisGridElement, m_id, AcDb::kForWrite))
if (Acad::eOk == pGisGridElement->QueryToView())
Access a broad range of knowledge to help get the most out of your products and services.