Is there a way to display the projection (FL-W83) or Datum (NAD83) of a DWG file in the titleblock? Maybe using fields, or a diesel expression of some sort? I belive the information resides in the .NET framework, how can I get that into my titleblock?
You don't need .NET to get this (although you could if you want), it is accessible using the COM API meaning you can use some simple lisp to get the info. Then you could populate the attributes in the titleblock with the desired info: If you need help with the editing the titleblock, there are plenty of posts in the AutoCAD customization -> lisp forum.
(vl-load-com) (setq prod (vlax-product-key)) (setq prodStr (strcat "AeccXUiLand.AeccApplication" (cond ((vl-string-search "\\R17.0\\" prod) ".4.0" ) ;;2007 ((vl-string-search "\\R17.1\\" prod) ".5.0" ) ;;2008 ((vl-string-search "\\R17.2\\" prod) ".6.0" ) ;;2009 ((vl-string-search "\\R18.0\\" prod) ".7.0" ) ;;2010 ((vl-string-search "\\R18.1\\" prod) ".8.0" ) ;;2011 ((vl-string-search "\\R18.2\\" prod) ".9.0" ) ;;2012 ((vl-string-search "\\R19.0\\" prod) ".10.0" ) ;;2013 (t "") ) ) ) (setq *acad* (vlax-get-acad-object)) (setq C3D (vla-getinterfaceobject *acad* prodStr)) (setq C3Ddoc (vla-get-activedocument C3D) settings (vlax-get c3ddoc 'settings) dwgstg (vlax-get settings 'drawingsettings) zonestg (vlax-get dwgstg 'unitzonesettings) coordsys (vlax-get zonestg 'coordinatesystem) )
from that final variable you can get the properties you need:
(vlax-get coordsys 'cscode) (vlax-get coordsys 'datum) (vlax-get coordsys 'description) (vlax-get coordsys 'projection) (vlax-get coordsys 'unit)
You probably just need the first 2.
Thanks, I'll give it a try.