Author Topic: Local Variables list..!?  (Read 3700 times)

0 Members and 1 Guest are viewing this topic.

Andrea

  • Water Moccasin
  • Posts: 2372
Local Variables list..!?
« on: February 22, 2006, 03:57:08 PM »
Hi all,

i'm trying to get a list of all local variables..
what i mean about local is...by drawing..

eg:
TEXTSIZE
PDMODE
PLINEWID

etc...

these variable do not affect all drawing but only the one who you are in..
so in the result of needed list I'm not supposed to have:

FILEDIA
EXPERT
PICKADD

etc...

any idea how ?
Keep smile...

GDF

  • Water Moccasin
  • Posts: 2081
Re: Local Variables list..!?
« Reply #1 on: February 22, 2006, 04:06:33 PM »
Search for this one.

;;; SYSVARDLG.LSP                                                     
;;; Requires file SYSVARDLG.DCL                                                           
;;; 2002.02.31, Stig Madsen v.0.92

Gary
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

GDF

  • Water Moccasin
  • Posts: 2081
Re: Local Variables list..!?
« Reply #2 on: February 22, 2006, 04:11:00 PM »
Sorry, I forgot who wrote this one.

Code: [Select]
(defun C:SVARS ()
  (setq ilist nil
var_list '("ACADLSPASDOC"  "ACADPREFIX"    "ACADVER"
   "ACISOUTVER"    "AFLAGS"    "ANGBASE"
   "ANGDIR"    "APBOX"    "APERTURE"
   "AREA"    "ATTDIA"    "ATTMODE"
   "ATTREQ"    "AUDITCTL"    "AUNITS"
   "AUPREC"    "AUTOSNAP"    "BACKZ"
   "BINDTYPE"    "BLIPMODE"    "CDATE"
   "CECOLOR"    "CELTSCALE"    "CELTYPE"
   "CELWEIGHT"    "CHAMFERA"    "CHAMFERB"
   "CHAMFERC"    "CHAMFERD"    "CHAMMODE"
   "CIRCLERAD"    "CLAYER"    "CMDACTIVE"
   "CMDDIA"    "CMDECHO"    "CMDNAMES"
   "CMLJUST"    "CMLSCALE"    "CMLSTYLE"
   "COMPASS"    "COORDS"    "CPLOTSTYLE"
   "CPROFILE"    "CTAB"    "CURSORSIZE"
   "CVPORT"    "DATE"    "DBMOD"
   "DCTCUST"    "DCTMAIN"    "DEFLPLSTYLE"
   "DEFPLSTYLE"    "DELOBJ"    "DEMANDLOAD"
   "DIASTAT"    "DIMADEC"    "DIMALT"
   "DIMALTD"    "DIMALTF"    "DIMALTRND"
   "DIMALTTD"    "DIMALTTZ"    "DIMALTU"
   "DIMALTZ"    "DIMAPOST"    "DIMASO"
   "DIMASZ"    "DIMATFIT"    "DIMAUNIT"
   "DIMAZIN"    "DIMBLK"    "DIMBLK1"
   "DIMBLK2"    "DIMCEN"    "DIMCLRD"
   "DIMCLRE"    "DIMCLRT"    "DIMDEC"
   "DIMDLE"    "DIMDLI"    "DIMDSEP"
   "DIMEXE"    "DIMEXO"    "DIMFIT"
   "DIMFRAC"    "DIMGAP"    "DIMJUST"
   "DIMLDRBLK"    "DIMLFAC"    "DIMLIM"
   "DIMLUNIT"    "DIMLWD"    "DIMLWE"
   "DIMPOST"    "DIMRND"    "DIMSAH"
   "DIMSCALE"    "DIMSD1"    "DIMSD2"
   "DIMSE1"    "DIMSE2"    "DIMSHO"
   "DIMSOXD"    "DIMSTYLE"    "DIMTAD"
   "DIMTDEC"    "DIMTFAC"    "DIMTIH"
   "DIMTIX"    "DIMTM"    "DIMTMOVE"
   "DIMTOFL"    "DIMTOH"    "DIMTOL"
   "DIMTOLJ"    "DIMTP"    "DIMTSZ"
   "DIMTVP"    "DIMTXSTY"    "DIMTXT"
   "DIMTZIN"    "DIMUNIT"    "DIMUPT"
   "DIMZIN"    "DISPSILH"    "DISTANCE"
   "DONUTID"    "DONUTOD"    "DRAGMODE"
   "DRAGP1"    "DRAGP2"    "DWGCHECK"
   "DWGCODEPAGE"   "DWGNAME"    "DWGPREFIX"
   "DWGTITLED"    "EDGEMODE"    "ELEVATION"
   "EXPERT"    "EXPLMODE"    "EXTMAX"
   "EXTMIN"    "EXTNAMES"    "FACETRATIO"
   "FACETRES"    "FILEDIA"    "FILLETRAD"
   "FILLMODE"    "FONTALT"    "FONTMAP"
   "FRONTZ"    "FULLOPEN"    "GRIDMODE"
   "GRIDUNIT"    "GRIPBLOCK"    "GRIPCOLOR"
   "GRIPHOT"    "GRIPS"    "GRIPSIZE"
   "HANDLES"    "HIDEPRECISION" "HIGHLIGHT"
   "HPANG"    "HPBOUND"    "HPDOUBLE"
   "HPNAME"    "HPSCALE"    "HPSPACE"
   "HYPERLINKBASE" "IMAGEHLT"    "INDEXCTL"
   "INETLOCATION"  "INSBASE"    "INSNAME"
   "INSUNITS"    "INSUNITSDEFSOURCE"
   "INSUNITSDEFTARGET"    "ISAVEBAK"
   "ISAVEPERCENT"  "ISOLINES"    "LASTANGLE"
   "LASTPOINT"    "LASTPROMPT"    "LENSLENGTH"
   "LIMCHECK"    "LIMMAX"    "LIMMIN"
   "LISPINIT"    "LOCALE"    "LOGFILEMODE"
   "LOGFILENAME"   "LOGFILEPATH"   "LOGINNAME"
   "LTSCALE"    "LUNITS"    "LUPREC"
   "LWDEFAULT"    "LWDISPLAY"    "LWUNITS"
   "MAXACTVP"    "MAXSORT"    "MBUTTONPAN"
   "MEASUREINIT"   "MEASUREMENT"   "MENUCTL"
   "MENUECHO"    "MENUNAME"    "MIRRTEXT"
   "MODEMACRO"    "MTEXTE"    "NOMUTT"
   "OFFSETDIST"    "OFFSETGAPTYPE" "OLEHIDE"
   "OLEQUALITY"    "OLESTARTUP"    "ORTHOMODE"
   "OSMODE"    "OSNAPCOORD"    "PAPERUPDATE"
   "PDMODE"    "PDSIZE"    "PELLIPSE"
   "PERIMETER"    "PFACEVMAX"    "PICKADD"
   "PICKAUTO"    "PICKBOX"    "PICKDRAG"
   "PICKFIRST"    "PICKSTYLE"    "PLATFORM"
   "PLINEGEN"    "PLINETYPE"    "PLINEWID"
   "PLOTID"    "PLOTROTMODE"   "PLOTTER"
   "PLQUIET"    "POLARADDANG"   "POLARANG"
   "POLARDIST"    "POLARMODE"    "POLYSIDES"
   "POPUPS"    "PROJECTNAME"   "PROJMODE"
   "PROXYGRAPHICS" "PROXYNOTICE"   "PROXYSHOW"
   "PSLTSCALE"    "PSPROLOG"    "PSQUALITY"
   "PSTYLEMODE"    "PSTYLEPOLICY"  "PSVPSCALE"
   "PUCSBASE"    "QTEXTMODE"    "RASTERPREVIEW"
   "REFEDITNAME"   "REGENMODE"    "RTDISPLAY"
   "SAVEFILE"    "SAVEFILEPATH"  "SAVENAME"
   "SAVETIME"    "SCREENBOXES"   "SCREENMODE"
   "SCREENSIZE"    "SDI"    "SHADEDGE"
   "SHADEDIF"    "SHORTCUTMENU"  "SHPNAME"
   "SKETCHINC"    "SKPOLY"    "SNAPANG"
   "SNAPBASE"    "SNAPISOPAIR"   "SNAPMODE"
   "SNAPSTYL"    "SNAPTYPE"    "SNAPUNIT"
   "SOLIDCHECK"    "SORTENTS"    "SPLFRAME"
   "SPLINESEGS"    "SPLINETYPE"    "SURFTAB1"
   "SURFTAB2"    "SURFTYPE"    "SURFU"
   "SURFV"    "SYSCODEPAGE"   "TABMODE"
   "TARGET"    "TDCREATE"    "TDINDWG"
   "TDUCREATE"    "TDUPDATE"    "TDUSRTIMER"
   "TDUUPDATE"    "TEMPPREFIX"    "TEXTEVAL"
   "TEXTFILL"    "TEXTQLTY"    "TEXTSIZE"
   "TEXTSTYLE"    "THICKNESS"    "TILEMODE"
   "TOOLTIPS"    "TRACEWID"    "TRACKPATH"
   "TREEDEPTH"    "TREEMAX"    "TRIMMODE"
   "TSPACEFAC"    "TSPACETYPE"    "TSTACKALIGN"
   "TSTACKSIZE"    "UCSAXISANG"    "UCSBASE"
   "UCSFOLLOW"    "UCSICON"    "UCSNAME"
   "UCSORG"    "UCSORTHO"    "UCSVIEW"
   "UCSVP"    "UCSXDIR"    "UCSYDIR"
   "UNDOCTL"    "UNDOMARKS"    "UNITMODE"
   "VIEWCTR"    "VIEWDIR"    "VIEWMODE"
   "VIEWSIZE"    "VIEWTWIST"    "VISRETAIN"
   "VSMAX"    "VSMIN"    "WHIPARC"
   "WMFBKGND"    "WORLDUCS"    "WORLDVIEW"
   "WRITESTAT"    "XCLIPFRAME"    "XEDIT"
   "XFADECTL"    "XLOADCTL"    "XLOADPATH"
   "XREFCTL"    "ZOOMFACTOR"
  )
  )
  (foreach v var_list
    (and (getvar v)
(setq ilist (cons (cons v (getvar v)) ilist))
    )
  ) 
  (foreach XX ilist
    (print XX)
    (princ)
  )
  (TEXTSCR)   
  (princ)
)
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Local Variables list..!?
« Reply #3 on: February 22, 2006, 04:38:18 PM »
thanks Gary...

I'm afraid to use this code...
because need to remake the code for the future version of autoCAD..
not useful..

I would like to know if there is something more simple like....

Code: [Select]
(setq gvar   (get-cadvariables))
        gvar2 (get-localvariable gvar)
)
Keep smile...

DanB

  • Bull Frog
  • Posts: 367
Re: Local Variables list..!?
« Reply #4 on: February 24, 2006, 12:44:24 PM »
I'm not entirely sure this will help you but...try at command line "SYSVDLG" (this works in v2006, not sure when it was implemented).

Dan

Slimę

  • Needs a day job
  • Posts: 6566
  • The Dude Abides...
Re: Local Variables list..!?
« Reply #5 on: February 24, 2006, 02:02:42 PM »
I'm not entirely sure this will help you but...try at command line "SYSVDLG" (this works in v2006, not sure when it was implemented).

Dan

Quite awhile, I've been using it since a2k.
I drink beer and I know things....