List of variables in use

Dave Alexander

Usenet Archive
Joined
Jul 14, 2003
Messages
100
Reaction score
0
I am working with a system that does weird stuff and comes from a .fas file so I cannot look and see what the variables are.

I looked at atoms-family but couldn't figure out if that was the function and I wasn't doing it correctly or that's not what it was for.

If I had a list of the variables then I could run the function, and then check the variables one at a time to figure out which ones were setting what.

Any help would be appreciated.

Dave Alexander
Keen Engineering Co. Ltd.
 
I just tried it. Maybe I didn't use it properly but it didn't seem to do anything. I will have to check customization manual. I may get some help on its application.

Thanks,

Dave Alexander
Keen Engineering Co. Ltd.
 
A bit of overkill, but I use it from time to time.
The list of the sysvars for A2K

(defun c:setvl (/ var_list)
(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))))
(princ))

(defun c:compv (/ dlist)
(foreach v var_list
(cond ((not (getvar v)))
((and (assoc v ilist)
(not (equal (cdr (assoc v ilist)) (getvar v) 1e-14)))
(setq dlist (cons (cons v (getvar v)) dlist)))))
(prin1 dlist)
(prin1))

-David
 
David,
I tried your example (fails). In c:setvl you make the 'var_list' private. In c:compv - you reference it. So, do you need to change the (defun c:setvl (/ var_list) (defun c:setvl :)
Bob
 
Yep,

That's what I get for trying to clean up an old routine for the NG posts. Should have left well enough alone. -David
 
David,
After I changed the defun line, all was well. Nice. It did pick up quite a few sysvar's that changed, to do with time, etc. plus the one that I changed for test.

On another note, do you think that Dave Alexander was talking about the (setvar stuff - or - about maybe 'internal' variables that the .fas file is setting ? E.G. (setq my_local_var ?? If Dave was thinking of a 'list' of the .fas (internal) variables, is probably not 'visible' directly using atom-family, alas.
Bob
 
the (setvar stuff - or - about maybe 'internal' variables that the .fas file is setting ? E.G. (setq my_local_var <<

I took a guess. -David
 
Thanks guys, that (setq my_local_var is what I was looking for. The system was originally written in 1987 and revised once for R14 and then again for
2000.

It is based on assigning linewidths to layers which is okay with me (I have always used layer color to assign linewidths) but my problem is that when they went to layout tab for plotting (probably R14), they set up linetypes based on something completely ignoring dimscale. They use an inhouse utility that sets all the variables including osnaps and aperature and pickbox. It doesn't matter what I set these to, one command off the menu and they are all reset back to the system settings. The blocks are inserted off the menu by as simple layer set, blockname set to and then a lisp function defined in the fas file does the work, resetting everythink again. Drives me nuts. I have a simple pline leader lisp for size annotation inserting a block attribute and then changing the attribute to what I want and the darn thing will not work with their settings. They apparently don't have a standard leader text command. I have no idea how they do pipe sizes or notes.

Its a new job for me and it has really slowed me down. I just cannot go off on my own as this thing with the linetypes will screw up the plotting and I am doing some work for another branch office and have to intergrate my portion with their drawings. When we go to 2004 next week, I will have to writing a new system but, in the mean time.......

I would have thought that there was a "table" of local and global variables.

Dave Alexander
 
Only 'table' of var's in stack is atoms-family. This (now) has a LOT of vlx-this and vlx-that .. very long list. Burried in the blur are the 'new' vars assigned (if you can spot them). Even if you make a list of them, and compare, it still won't keep the app from doing what it is coded to do. You might be better off just writing a Lisp to 'reset' all things to the way you want, and batch the set of drawings.
Bob
 
Thanks Bob,

I appreciate the response.

I think you are right. The only things I really need to match from that system are the layer names (modified to include a level), blocks, and linetypes.

Dave Alexander

ECCAD said:
Only 'table' of var's in stack is atoms-family. This (now) has a LOT of
vlx-this and vlx-that .. very long list. Burried in the blur are the 'new' vars assigned (if you can spot them). Even if you make a list of them, and compare, it still won't keep the app from doing what it is coded to do. You might be better off just writing a Lisp to 'reset' all things to the way you want, and batch the set of drawings.
 

Latest threads

Back
Top