Error Code 1233

Error Code 1233

Anonymous
Not applicable
1,497 Views
5 Replies
Message 1 of 6

Error Code 1233

Anonymous
Not applicable

I am getting an error trying to set the coordinate system. The error message is... Exception of type 'Autodesk.Gis.Map.MapException' was thrown. It also has an error code of 1233 but that is all the information it gives me. Anyone know what error code 1233 is or has a list of AutoCAD error codes for future reference?

 

The code is pretty simple and sometimes it does work so it may have something to do with locks or something. I'm very new to AutoCAD development...

 

Autodesk.Gis.Map.MapApplication mapApp = Autodesk.Gis.Map.HostMapApplicationServices.Application;
Autodesk.Gis.Map.Project.ProjectModel activeProject = mapApp.ActiveProject;
activeProject.Projection = CoordinateSystem;

 

Thanks

0 Likes
Accepted solutions (1)
1,498 Views
5 Replies
Replies (5)
Message 2 of 6

augusto.goncalves
Alumni
Alumni
Check the Autodesk.Gis.Map.Constants.ErrorCode list of erros, that would help.

I believe the 1233 is: DwgHasQueriedObject
Regards,



Augusto Goncalves
Twitter @augustomaia
Autodesk Developer Network
0 Likes
Message 3 of 6

Anonymous
Not applicable

Thanks for the reply. I see Autodesk.Gis.Map.Constants.ErrorCode has the text but it doesn't have the corresponding error code number. Is there any way I can retrieve the text using the code to be able to troubleshoot and/or display the text to the user?

0 Likes
Message 4 of 6

augusto.goncalves
Alumni
Alumni
In fact ErrorCode is an enumeration, so the number are "implicit"
Regards,



Augusto Goncalves
Twitter @augustomaia
Autodesk Developer Network
Message 5 of 6

Anonymous
Not applicable
Accepted solution

Ok, got it. This gives me what I'm looking for, thanks!

 

string ErrorText = ((Autodesk.Gis.Map.Constants.ErrorCode)exception.ErrorCode).ToString();

 

 

Message 6 of 6

danielmollerX5W2N
Contributor
Contributor

Hello! Where can you find this error code???

 

I also have problems with activeProject.Projection = CoordinateSystem

 

Did you solve it?

0 Likes