I would like to be able to make a lisp routine that would run SETVAR and have a text file compiled of a list of all the current system variable Visual LISP Use the LOGFILENAME and LOGFILEMODE system variables to capture console echo to a text file. You should also set the QAFLAGS system. I am attempting to extract data from drawings given to me that do not have attributes assigned to certain text blocks. I do know the data I want will contain either 'MARK', 'ETCH', or 'STAMP'.
It was very intersesting and educational to me to have had someone ask here a while back whether sysvars were (getvar)s or (getenv)s or maybe both. So I took his list and converted it into an AutoLisp routine.Here it is: (defun checkvars ( / varlist bad getvars getenvs) (setq varlist '( 'PlotSpoolerNode' 'PlotSpoolerDirectory' 'AutoSaveFile' 'TempDirectory' 'DefaultPlotToFile' 'ModeBits' 'AlarmOnError' 'ActiveAssistance' 'PROXYWEBSEARCHNUMBER' 'Use TODAY as Startup dialog' 'ShowFullPathInTitle' 'LayoutRegenControl' 'SnapType' 'ShowHyperlinkCursor' 'ShowHyperlinkToolTip' 'ShowPaperSize' 'ObjectARXSupportPath' 'ObjectDBXSupportPath' 'ExplorerInsertUnits' 'LineWeightDisplayScale' 'MRUFilesToList' 'HideWarningDialogs' 'DatabaseTablesOpenMode' 'SQLIndexInDwg' 'InsertUnitsDefTarget' 'InsertUnitsDefSource' 'Measureinit' 'AssignInsertUnits' 'LoadPaletteBySession' 'ShowOleScaleDialog' 'ImageHighlight' 'AutoSnapPolarAddAng' 'LogFilePath' 'SaveFilePath' 'OffsetCurveGapType' 'UcsIconNonActiveColor' 'UcsIconActiveColor' 'UcsIconLineWidth' 'UcsIconCone' 'UcsIconSize' 'UcsIcon3d' 'UCSAxisAng' 'UCSView' 'UCSOrtho' 'XFadeCtl' 'DisableTrueColor' 'Trimmode' 'CheckDrawingSignature' 'PrinterDescDir' 'PrinterStyleSheetDir' 'PrinterConfigDir' 'ShowPrintBorder' 'ShowPaperMargins' 'ShowPaperBackground' 'CreateViewports' 'ShowPlotSetup' 'ShowRuler' 'ShowTabs' 'DefaultFormatForSave' 'LineWeightUnits' 'WHIPTHREAD' 'WhipThreadEnable' 'WhipArcEnable' 'DefaultLayerZeroPlotStyle' 'DefaultPlotStyle' 'HatchAlertDisabled' 'DatabaseWorkSpacePath' 'TemplatePath' 'MaxArray' 'EdgeMode' 'MaxHatch' 'HatchType' 'PlineType' 'AVEMAP' 'ImportPathInfo' 'CursorSize' 'ShowProxyGraphics' 'ShowProxyDialog' 'ARXDemandLoad' 'TextWindow.FontPitchAndFamily' 'TextWindow.FontItalic' 'TextWindow.FontWeight' 'TextWindow.FontHeight' 'TextWindow.FontFace' 'CmdLine.FontPitchAndFamily' 'CmdLine.FontItalic' 'CmdLine.FontWeight' 'CmdLine.FontHeight' 'CmdLine.FontFace' 'FontPitchAndFamily' 'FontItalic' 'FontWeight' 'FontHeight' 'FontFace' 'MonoVectors' 'Plot preview background' 'Autotracking vector' 'LayoutXhairPickboxEtc' 'XhairPickboxEtc' 'TextWindow.BackColor' 'TextWindow.ForeColor' 'CmdLine.BackColor' 'CmdLine.ForeColor' 'Layout background' 'Background' 'MaxDwg' 'CustomColors' 'CmdHistLines' 'CmdVisLines' 'MaxApp' 'ToolTips' 'Scrollbars' 'UseMenuHeader' 'AcadClassic' 'SDIMode' 'NoStartUpDialog' 'DemandLoadingModeler' 'ScreenMenu' 'DigitizerArbitration' 'BmpOutCompression' 'LogFileOpen' 'ACADLOGFILE' 'LOGFILE' 'UserName' 'ACADALTMENU' 'ACADLspAsDoc' 'AutoSnapTrackPath' 'AutoSnapPolarDistance' 'AutoSnapPolarAng' 'AutoSnapPolarMode' 'AutoSnapShowAperture' 'AutoSnapSize' 'AutoSnapColor' 'OleHide' 'XrefLoadPath' 'Trim&ExtendProjectMode' 'MaxOctTreeNodesToAllocate' 'PostscriptQuality' 'PickFirst' 'PickDrag' 'PickBox' 'PickAuto' 'PickAdd' 'GripSize' 'GripHot' 'GripColor' 'GripBlock' 'Grips' 'EntityExtentVariant' 'AuditControlFlags' 'MenuOptionFlags' 'XrefControlFlags' 'DisableGraphicsTextArea' 'SDF_AttributeExtractTemplateFile' 'ObjectSnapCursorSize' 'StatusLine&CoordinateDisplay' 'RasterPreview' 'PlotRotationMode' 'QAFlags' 'CommandDialogs' 'FileDialog' 'RtDisplay' 'ZoomFactor' 'UseContextMenus' 'ContextMenus' 'MiddleButtonPan' 'OsnapCoord' 'XrefLazyLoadMode' 'TextFill' 'MTextEditor' 'CustomDictionary' 'MainDictionary' 'PSOUT_PrologFileName' 'AutomaticSaveMinutes' 'DisableScreenMenuArea' 'MaxSortEntries' 'FontMappingFile' 'EmergencyFont' 'NetLocation' 'IsaveBackupDwg' 'IsavePercent' 'MenuFile' ) ) (foreach item varlist (if (getenv item)(setq getenvs (cons item getenvs))) ) (foreach item varlist (if (getvar item)(setq getvars (cons item getvars))) ) (foreach item varlist (if (and (not (getvar item))(not (getenv item))) (setq bads (cons item bads)) ) ) (princ (strcat 'nACADVER=' (getvar 'acadver') '_VERNUM=' (getvar '_vernum'))) (princ 'nnItems found via (getenv):n') (if getenvs (mapcar 'write-line (acad_strlsort getenvs)) (write-line 'None') ) (princ 'nItems found via (getvar):n') (if getvars (mapcar 'write-line (acad_strlsort getvars)) (write-line 'None') ) (princ 'nItems NOT found:n') (if bads (mapcar 'write-line (acad_strlsort bads)) (write-line 'None') ) (princ) ) -- John Uhden, Cadlantic/formerly CADvantage http://www.cadlantic.com Sea Girt, NJ 'Jim Leonard' wrote in message news:[email protected]adrTaRb... > I would like to be able to make a lisp routine that would runSETVAR and > have a text file compiled of a list of all the current system variable > settings. Would this be possible or has it already been done? I think it > would make a few trouble shooting issues easier for me. > > Thanks, > Jim Leonard