krondys Posted April 24, 2012 Share Posted April 24, 2012 Using VB.net, how can I retrieve the currently assigned coordinate system in a drawing? Quote Link to comment Share on other sites More sharing options...
BlackBox Posted April 24, 2012 Share Posted April 24, 2012 Welcome to CADTutor! I believe you'll need to open the UcsTableRecord as ForRead; consider this topic from the AutoCAD .NET Developer's Guide as a starting point: Define a User Coordinate System. HTH Quote Link to comment Share on other sites More sharing options...
krondys Posted April 24, 2012 Author Share Posted April 24, 2012 Because I missed this bit of illumination in the first round- I am referring to the AutoCAD Map3D Assigned Global Coordinate system. Thanks for the welcome! Quote Link to comment Share on other sites More sharing options...
BlackBox Posted April 24, 2012 Share Posted April 24, 2012 Map 3D is built upon AutoCAD which makes available the UcsTableRecord ... If this will not work for you, in your code, then more information is needed. Quote Link to comment Share on other sites More sharing options...
krondys Posted April 24, 2012 Author Share Posted April 24, 2012 What I am needing is the name of the assigned coordinate system (such as "WGS84") as a string. Quote Link to comment Share on other sites More sharing options...
Kerry Brown Posted April 25, 2012 Share Posted April 25, 2012 What I am needing is the name of the assigned coordinate system (such as "WGS84") as a string. You may need to rethink your request. The Current UCS may NOT be named ... in fact, in most cases it probably won't be. Regards Kerry. Quote Link to comment Share on other sites More sharing options...
krondys Posted April 25, 2012 Author Share Posted April 25, 2012 I am using Map3D's built in functions to generate coordinates in different systems- I have no problem with doing what should be the hard part, which is transforming coordinates from one of my unique coordinate systems (Transverse Mercator projection from WGS84 Lat/Long) into any number of other systems. My problem is that I have many different systems that I may be working in at any one time, and what I would like to be able to do is have my plug-in determine what the actual assigned coordinate system is. I would have thought that would be a trivial task, but I have not yet found even a glimmer of hope on how to get that currently assigned system. The named coordinate systems I am referring to are those assigned using the "MAPCSASSIGN" command in Map3D/Civil3D. For example, I would like to determine that the current drawing is assigned "UTM27-13" (NAD 27 UTM coordinates, Zone 13) so that I may do the transformation to Lat/Long (or whatever I need). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.