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: 

Set SRS for the current map

1 REPLY 1
Reply
Message 1 of 2
MarkVolz4695
601 Views, 1 Reply

Set SRS for the current map

Hi,

 

Does anyone know how to set the SRS for the current map.

 

I can see where you can get the SRS for the current map (cmap.GetMapSRS or cmap.MapSRS) and I can see where to set it when you create a new map but I can not find where to alter the existing one.

 

Any help would be greatly appreciated.

 

Thanks.

1 REPLY 1
Message 2 of 2
Daniel.Du
in reply to: MarkVolz4695

        public void SetMapSRS(string srsCode)
        {
            Autodesk.Gis.Map.MapApplication mapApp = Autodesk.Gis.Map.HostMapApplicationServices.Application;
            Autodesk.Gis.Map.Project.ProjectModel projModel = mapApp.ActiveProject;

            projModel.Projection = srsCode;
        }

 

 

For example:

 

SetMapSRS("CA-I");

 

Hope this helps.



Daniel Du
Developer Technical Services
Autodesk Developer Network

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

Post to forums  

Autodesk Design & Make Report

”Boost