ahhhhh.....I didn't see that part where he was talking about adding it to a legend. Hence the reason why I added my understanding of the OP in my post. Either way, those are three workarounds for field info when system variables can't be found or digging for the right one is more frustrating than picking a booger with two broken hands.
antoniovinci is onto to what I'm after.
For anything that's geo-referenced you have to assign the coordinate reference system (CRS), which has an associated code, i.e. UTM83-12.
So I want a way of auto-populating a note in the legend that tells the reader what coordinate system the drawing is using. I type most of the note in and add a field (or Rtext, whatever), to add the CRS and everything's good.
If I have to type it in somewhere manually, then I might as well type it into the notes as well, it's meant to be easier, with less user input. Because to add it to the things members of our CAD group have to do already, it will get missed half the time - hence the auto-part of it.
Honestly, I thought someone would know what setvar/sysvar to use, and off I'd go.
Don't know what version of C3D you are running but in 2014 (I think in 2013 but we never went to that version) there is a space on the status bar that shows you the current coordinate system. (see figure showing Florida NAD 83 East) If there is no system assigned, there will be nothing shown (the little pin on the left is the "Show Geomarker" toggle). This won't help you if you want to show the system on plots but will let the user know when they are in the dwg.
This won't help you if you want to show the system on plots
Unfortunately the OP wanna indeed show the CRS value in a hardcopy (paper or PDF) probably to Acadless users...
As said before, I can't think of another system variable else than ADE_PROJECTION embedded in the .DXF output.
The problem is: how to extract it automatically, in order to populate the legenda field..?
Good Call ! I feel somewhat ignorant not noticing this before.
It appears that "borderliner" could have a non-plotting note to his users to check the lower area of their model space for this.
Mike, so very near, and yet.... I'm on C3D 2012 - and no info in the status bar.
It was only meant to be a self-populating peice of text, exactly the same as most people have on their drawings showing the file name and path, just a little info showing what CRS was used in the drawing.
Thank you all.
Here is a very crude method of doing what you want, borderliner. Save this lsp file to a location in your ACAD seacrh path. If you don't already have an acaddoc.lsp file create one in the same place as this lisp. Add these 2 lines to the acaddoc.lsp file:
(load "Coordsystem extraction.lsp")
Now create a text/mtext object with a field set to use the SYSVAR USERS1. Unfortunately, the USER* sysvars are not directly available in the Field options, but you can use use Diesel expression to do it for you:
This text will now always show the value of USERS1. Note!!!!! This Sysvar does NOT get saved with the drawing, hence the use of the lisp in the acaddoc.lsp file which loads everytime a drawing is opened. Also, other lisp files MAY overwrite this setting, although it's been common practice to avoid using these sysvars unless it's the only option. So, while this does work and get you what you need, it could have it's pitfalls.
Yep, depending on how you want it...this will extract the description instead of the code:
(setvar 'users1 (vlax-get-property coordsystem 'description))
or this will make one string of the code & description:
(setvar 'users1 (strcat (vlax-get-property coordsystem 'cscode) ": " (vlax-get-property coordsystem 'description)))
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.