Save/Restore OSMODE from a file 1> Save the OSMODE system variable to a file. (could be used for other system variables): ^C^C^P(progn(setq OSFILENAME (open "u:/acad2000/SavedOSnap.txt" "w"))(write-line (itoa (getvar "osmode")) OSFILENAME)(close OSFILENAME) 2> Extract the OSMODE system variable from a saved file. ^C^C^P(progn(setq reados (open … [Read more...] about Sample Macros for AutoCAD
AutoCAD Tutorials
Background color of icons do not match – AutoCAD problem
At least Applies to:AutoCAD 2000Windows 2000ProblemThe background color of the tool buttons does not match the Windows 3D-object color, or the icon background color is not transparent.ReasonThe color palette in windows is set to low, 256 colors for example, or is set to high, True color for example.WhyWhen menus are made, all the icon bitmaps are complied into a MNR file. It … [Read more...] about Background color of icons do not match – AutoCAD problem
AutoLISP Lesson 10 – INPUT AND OUTPUT
(April 1999)The most important part of any program, other than the internal calculations that occur, will be the input / output section. These are the parts of your program that deal with getting Information from the user and storing or retrieving data from a storage area. The Dialog Control Language (DCL) will not be covered in this text, due to the expansive nature of the … [Read more...] about AutoLISP Lesson 10 – INPUT AND OUTPUT
AutoLISP Lesson 9 – DATA STRUCTURES
(April 1999) All data structures in AutoLISP are list's. Everything in AutoLISP is a list, if it's not a function, it's a list. If it's a list, it's a data structure.A list is nothing more than a single dimension array. If you have a list of lists, then you have a two dimensional arrays. It is even possible to nest two-dimensional lists, inside another two dimensional … [Read more...] about AutoLISP Lesson 9 – DATA STRUCTURES
AutoLISP Lesson 8 – LOOPING
(April 1999)There are three basic styles of loops you can use, the first is the counting loop, the second is the continuously evaluating loop, and the third is the endless loop. The counting loop goes through the loop a certain predetermined number of times. The continuously evaluating loop, loops until some condition is met at which time it terminates. The endless loop … [Read more...] about AutoLISP Lesson 8 – LOOPING
AutoLISP Lesson 7 – PROGRAM CONTROL
(April 1999)AutoLISP has many predefined functions to allow you to control your programs. Some of these functions are what are known as "relational" operators, and some are known as "conditional" operators.Relational operatorsNote: Arguments in brackets [] are optional.= (= atom atom ...)(= 3 2) ;Returns nil(= 3 3) ;Returns T(= 3 3 3) ;Returns TDetermines if a … [Read more...] about AutoLISP Lesson 7 – PROGRAM CONTROL