.NET
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
how to set a global coordinate system
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
The following code works for querying the global coordinate system of a drawing
Dim Current1 As Autodesk.Gis.Map.MapApplication
Current1 = Autodesk.Gis.Map.HostMapApplicationServices.Applic
Dim Proiect1 As Autodesk.Gis.Map.Project.ProjectModel
Proiect1 = Current1.ActiveProject
MsgBox(Proiect1.Projection.ToString)
The following line of code doesn't work
Proiect1.Projection = "UTM83-12"
On vb.net gives this: "Exception of type ‘Autodesk.Gis.Map.MapException was thrown."
In Autocad gives this error: "Cannot save projection code to the drawing"
The error log is:
<?xml version="1.0" ?>
- <Map3dErrorLog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="AcMap3dErrorLog.xsd">
- <Session user="dpopescu" start="10/22/2009 7:22:56 AM" document="Drawing1.dwg">
<Error code="1" type="2" dispensation="1" sId="2" occurrence="1">Cannot save projection code to the drawing.</Error>
</Session>
</Map3dErrorLog>
Re: how to set a global coordinate system
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I'm asking because you're calling .ToString() on its value, which would
imply that it's not already a string.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010
http://www.acadxtabs.com
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");
The following code works for querying the global coordinate system of a
drawing
Dim Current1 As Autodesk.Gis.Map.MapApplication
Current1 = Autodesk.Gis.Map.HostMapApplicationServices.Applic
Dim Proiect1 As Autodesk.Gis.Map.Project.ProjectModel
Proiect1 = Current1.ActiveProject
MsgBox(Proiect1.Projection.ToString)
The following line of code doesn't work
Proiect1.Projection = "UTM83-12"
On vb.net gives this: "Exception of type 'Autodesk.Gis.Map.MapException was
thrown."
In Autocad gives this error: "Cannot save projection code to the drawing"
The error log is:
-
xsi:noNamespaceSchemaLocation="AcMap3dErrorLog.xsd
-
document="Drawing1.dwg">
projection code to the drawing.
Re: how to set a global coordinate system
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
HostMapApplicationServices.Application.ActiveProje
Re: how to set a global coordinate system
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Gives me the same error.
Re: how to set a global coordinate system
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Re: how to set a global coordinate system
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
This requires a document lock if you use document manager to open a dwg.

