AutoCAD Map 3D Developer
Welcome to Autodesk’s AutoCAD Map 3D Developer Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D Developer topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

WMS Layer - Resample Raster

2 REPLIES 2
Reply
Message 1 of 3
ohlsen1980
1064 Views, 2 Replies

WMS Layer - Resample Raster

Hello,

 

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?

2 REPLIES 2
Message 2 of 3
Daniel.Du
in reply to: ohlsen1980

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. 


<code_begin>
/// <summary>
/// Update this grid element according to current viewport.
/// </summary>
/// <returns>
/// Returns Acad::eOk if successful; otherwise, returns a different error code.
/// </returns>
Acad::ErrorStatus QueryToView();

Bool DoQueryToView()
{
AcAxDocLock locker;
SmartTransaction xaction(m_id.database());//m_id :given the object Id of the image
if (xaction.hasTransactionStarted())
{
AcMapDMGisGridElement* pGisGridElement;
if(Acad::eOk == xaction.getObject(pGisGridElement, m_id, AcDb::kForWrite))
{
if (Acad::eOk == pGisGridElement->QueryToView())
return true;
}
}
return false;
}

<code_end>

 



Daniel Du
Developer Technical Services
Autodesk Developer Network

Message 3 of 3
keith_sowinski
in reply to: Daniel.Du

@Daniel.Du 

Could this be possible using the FDO Provider for WMS capabilities as described in my posted question in the C3D customization forum?

"Resample" or "Clip" expression for WMS connection - Autodesk Community - Civil 3D

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost