Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

RE: [CONNECT C++] Assigning a GCS to a raster attachement

$
0
0

This is what I've come up with. The issue I have is that the raster doesn't actually "appear" until the cursor is updated by me moving the cursor off the view or I hit a "reset" (I'm doing the attach in _OnDataButton() of a DgnPrimitiveTool)

DgnDocumentMonikerPtr moniker = DgnDocumentMoniker::CreatePortableMoniker(NULL, fullFileName.GetName(), NULL, NULL, NULL, DgnPlatform::RelativePathPreference::CreateIfPossible);

DgnRasterStatus			rStatus;
DgnRasterOpenParamsPtr		openParams = DgnRasterOpenParams::Create(moniker, true);
DgnRasterPtr			dgnRaster=DgnRaster::Create( rStatus, *openParams, *ISessionMgr::GetActiveDgnModelRefP());
dgnRaster->SetGCSInheritedFromModelState(false);
GeoCoordinates::DgnGCSPtr	dgnGCS = Bentley::GeoCoordinates::DgnGCS::CreateGCS(L"UTM27-17", ACTIVEMODEL);
dgnRaster->SetDgnGCS( dgnGCS.get() );
dgnRaster->AddToModel();

 

 

Bruce


Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>