Hi, my problem of the day is, I want to have a piece of text added to the drawing notes that uses a field (or similar), to list the coordinate system code assigned to the drawing, i.e. UTM83-12.
Does anyone know if there’s a setvar or something that I can use?
I’m in Canada and they have a load of different coordinate systems to choose from, and I don’t want to have to manually enter it for every drawing.
Solved! Go to Solution.
Solved! by Jeff_M. See the answer in context.
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.
As far as I know the list of coordinate systems used within Civil3d is the same one that the Map tools use to assign coordinate systems - try the MAPCSASSIGN command to see the other way of doing it.
If two different parts of the software are being used to do the same thing then they must be sharing a variable somewhere.
Please use the Accept as Solution or Kudo buttons when appropriate
That's a typical "wish-list" good question, gentlemen.
Here's my workaround, waiting for a "true" solution by Autodesk.
1] export your drawing as DXF
2] open up this .DXF in Notepad and seek the ADE_PROJECTION string
3] two lines below it, you have the current CRS name, to be copied&pasted in your DWG legenda.
Don't know of the variable but in VB .NET code it is:
dim strCoordSys = CivilApplication.ActiveDocument.Settings.DrawingSettings.UnitZoneS
So if I understand this correctly, you want to add a field to text that will read a reference text line and you don't want to have to type it in every time. There are three workarounds I can think of.
1. If useing sheet set manager, add a custom project field. then input the text you want into that field. you can then add a field to reference the sheet set manager custom field.
2. If not using sheet set manager, you can add a piece of text somewhere in your drawing on a layer that is locked to prevent accidental erase. then create a field that is linked to an object. use the select from drawing option then once you select said text string, you can pick "contents" and it will duplicate what ever is in the text string.
3. If your annotation is created within your sheets, create a "dummy" sheet and name the tab what u want. then create a field to use a system variable. (field category: other, field names: systemvariable, system variable: ctab)
Hope this helps you out.
There are three workarounds I can think of
I fear none fits to the OP needs, sir.
He's looking for a way to fill a legenda field with the content of the current CRS (Coordinate Reference System) value.
Access a broad range of knowledge to help get the most out of your products and services.