Using AcMapMapManagementService::DuplicateMap() to create a duplicate Map

By Partha Sarkar

In AutoCAD Map 3D 2013 Platform API, we have added AcMapMapManagementService::DuplicateMap() to create a duplicate map.

Here is a C# code snippet which demonstrates how to create a duplicate map using this new API :

 

// Get an Instance of AcMapMapManagementService
 
AcMapMapManagementService mapMgServ = AcMapMapManagementService.GetInstance(HostApplicationServices.WorkingDatabase);
 
// Create a Duplicate Map
AcMapMap duplicateMap = mapMgServ.DuplicateMap(mapMgServ.CurrentMap);
 
// Set the Map Name
duplicateMap.SetName("MyDuplicate_Map");
 
// Set the Duplicate Map as current
mapMgServ.SetCurrentMap(duplicateMap);

Comments

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading