ࡱ> RTOPQq &bjbjt+t+ "AA&]:::::::NNNNNbDNwwwwwwww$mya{lw:wF[::F[F[F[04::wNN::::wF[|F[`6v::wL@O9NN8; wAutoLISP to Visual LISP: Design Solutions for AutoCAD Instructors Guide Chapter One Definitions Syntax - The way commands are arranged inside a computer program. Source Code - Is an ASCII text file containing a formal programming language. The source code file must be compiled, interpreted or assembled before a computer can use it. Flowchart - incorporates the use of graphic symbols to describe a sequence of operations or events. They are used to describe everything from the process involved in the treating of wastewater to the sequence of operations for a microprocessor. Pseudo-Code - A more natural way of preparing the source code for a computer program is with pseudo-code. In this method, standard English terms are used to describe what the program is doing. The descriptions are arranged in the logical order that they appear. GUI - A Graphical User Interface allows the user to interact with a computer by selecting icons and pictures that represent programs, commands, data files, and even hardware. Programming Language - The actual commands used to construct a computer program. Machine Language A program that is coded so that a computer can directly use the instruction contain within the program without any further translation. Hardware - is defined as the physical attributes of a computer, for example, the monitor, keyboard, central processing unit. Software - is defined as the programs or electronic instructions that are necessary to operate a computer. Binary - A number system that consist of two numbers one and zero. It is used extensively with computers because of its ease of implementation using digital electronics. Answers to Review Questions 2. This process allows the programmer to gather the necessary information used to construct the application. It also allows the program to start laying out the actual program before the source code is created. Thus allowing the programmer to ensure the quality and accuracy a program. 3. State the problemList unknown variablesList what is givenCreate diagramsList all formulasList assumptionsPerform all necessary calculationsCheck answer 4. Flowcharts use graphic symbols to represent a sequence or operation in a computer program, where as pseudo code uses standard English terms to describe what the program is doing. Flow Chart  Psuedo-Code Start Program Prompt user for Information Perform Calculations Check Answers Display Answers End Program 5. AutoLISP programs can be loaded into memory using one of two methods (the AutoLISP LOAD function or the AutoCAD APPLOAD command). The AutoLISP load function is a command line function that can be entered from the AutoCAD command prompt or placed inside of an AutoLISP application, where as the APPLOAD command is dialog based program that is executed from the AutoCAD command prompt. 6. The compiler converts the source code from the language in which a program is created into a format that the computer can understand. 7. (Function1 Argument1) 8. The Rich Text Format contains special commands used to describe important formatting information (fonts and margins). 9. GUI and NonGUI. GUI systems include windows 95, 98 NT and 2000, just to name a few, where as nonGUI system include DOS, and OS400. 10. The operating system is a set of program that is designed to controls the computers components. 11. The operating system is a set of programs that manages stored information, loads and unloads programs (to and from the computers memory), reports the results of operations requested by the user, and manages the sequence of actions taken between the computers hardware and software. 12. A comment is the description placed in a program for the sole purpose of aiding the programmer in keeping track of what a program is doing. Chapter Two Answers to Review Questions 1. In AutoLISP an integer is any whole number that ranges from 2,147,483,648 to +2,147,483,647, where as a real number is any any number including zero that is positive or negative, rational (a number that can be expressed as an integer or a ratio of two integers, , 2, 5) or irrational (square root of 2). 2. The GETREAL function returns a true real number where as the GETSTRING will return the value converted to a string. 3. When an object is created in AutoCAD, it is given a handle that is used when referencing information concerning that object. The handle that is assigned to an entity remains constant throughout the drawing's life cycle. However an entity name is applicable only to a particular object in the current drawing session 4. Local Variables are only available to the function in which they are defined, where as global variable are available to the entire program. 5. (DEFUN program (/ pt1) ;Pt1 is declared as a local ;variable. (function argument) ;Expression. (function argument) ;Expression. ) 6. File descriptors, just like entity names, are alphanumeric in nature and are only retained in the current drawing session or as long as the external file is open for input/output. Any time that an attempt is made to write, append, or read to a file, the file descriptor must be identified in that expression. 7. The AutoLISP OPEN function. 8. *PRIN1Prints an expression to the command line or writes an expression to an open file*PRINCPrints an expression to the command line or writes an expression to an open file*PRINTPrints an expression to the command line or writes an expression to an open file*WRITE-LINEWrites a string to the screen or to an open file Note: All definitions starting with a * were taken from the AutoLISP Programmers Reference. 9. Given the following equations write an AutoLISP expression for each. X2 + 2X 4 (defun c:X2Function () (setq NumberOne (getreal "\nEnter First Number : ") ) (Princ (- (+ (expt NumberOne 2) (* 2 NumberOne) ) 4 ) ) (princ) ) X4 + 4X3 + 7X2 + 1 (defun c:X4Function () (setq NumberOne (getreal "\nEnter First Number : ") ) (Princ (+ (expt NumberOne 4) (expt (* 4 NumberOne) 3) (expt (* 7 NumberOne) 2) 1 ) ) (princ) ) R1 + R2 / (R1)(R2) (defun c:RFunction () (setq R1 (getreal "\nEnter R1 : ") R2 (getreal "\nEnter R2 : ") ) (Princ (/ (+ R1 R2) (* R1 R2))) (princ) ) (2 + 5) * ( 2 * ( 4 5) / 6) (* (* (/ (- 4 5)) 2) (+ 2 5)) (L / Lo (defun c:DeltaFunction() (setq NumberOne (getreal "\nEnter First Number : ") NumberTwo (getreal "\nEnter Second Number : ") ) (Princ (/ (- NumberOne NumberTwo) NumberOne)) (princ) ) Chapter Three Definitions Element is an individual entity contained within a list. For example the list (Red Yellow Green) contains the elements: Red, Yellow and Green. Truncate To shorten a text string by removing a portion of that string. For example the text string This is an example is a truncated sub string of the text string This is an example of a truncated string. Atom Nested Function A nested function is a function that is contained within another function. The nesting of functions is most often attributed with If statements and loops. Answers to Review Questions 2. A list is capable of containing a varying amount of information. The use of list also reduces the amount of variables required in a program. They provide an efficient as well as a practical way of storing information over the traditional methods of using variables. 3. LIST (LIST 3.14 2.68 9.99 Text) 4.) Two or more list maybe combined into a single list by using either the AutoLISP function LIST or APPEND. The LIST function when supplied with multiple list as arguments, returns a single list in which its elements are the individual lists that were originally supplied to the LIST function. For example (LIST (3.14 5.98 9.99) (TEST1 TEST2) (9.11 RED MONDAY) ) Returns ((3.14 5.98 9.99)(TEXT1 TEXT2)(9.11 RED MONDAY)) The APPEND function on the other hand merges the elements of multiple list into a single list in which its elements are the elements of the supplied lists. For example (APPEND (3.14 5.98 9.99) (TEST1 TEST2) (9.11 RED MONDAY) ) Returns (3.14 5.98 9.99 TEXT1 TEXT2 9.11 RED MONDAY) CAR Returns the first element of a list CDR Returns a list starting with the second element CADR Returns the second element of a list CADDR Returns the third element of a list (CAR (3.14 5.98 9.99 TEXT1 TEXT2 9.11 RED MONDAY) ) Returns 3.14 (CDR (3.14 5.98 9.99 TEXT1 TEXT2 9.11 RED MONDAY) ) Returns (5.98 9.99 TEXT1 TEXT2 9.11 RED MONDAY) (CADR (3.14 5.98 9.99 TEXT1 TEXT2 9.11 RED MONDAY) ) Returns 5.98 (CADDR (3.14 5.98 9.99 TEXT1 TEXT2 9.11 RED MONDAY) ) Returns 9.99 6. By employing the AutoLISP STRCAT function 7. False, before numeric data can be combined with a string, it must first be converted from its native data format into a string data type. For real numbers this is accomplished by using the RTOS function. For integers this is accomplished by using the ITOA function. 8.) False, in AutoLISP a string can be truncated using the SUBSTR function. 9. In AutoLISP decisions can be made by using either the IF function or the COND function. The COND function differs from the IF function in the respect that the program is allowed to use multiple test expressions, with each having its own THEN ELSE arguments. 10. The AutoLISP PROGN function allows a program to evaluate multiple expressions sequentially and return the result of the last expression evaluated. 11. (SETQ ReturnString (STRCAT This is an example of an AutoLISP String) ) 12. (SETQ ReturnString (STRCAT The Amount of heat loss is (RTOS 456.87) btu/hr ) ) 13. (SETQ ReturnString (STRCAT The square root of (ITOA 2) is (RTOS 1.4142) ) ) 14. (SETQ ReturnString (STRCAT The program has completed (ITOA 57) cycles ) ) 15. (DEFUN c:ChapterThree15Answer () (SETQ NumberOne (GETREAL \nEnter NumberOne : ) NumberTwo (GETREAL \nEnter NumberTow : ) ) (PRINC (STRCAT \nThe product of the two numbers (RTOS NumberOne) and (RTOS NumberTwo) is (RTOS (* NumberOne NumberTwo)) ) ) (PRINC) ) Note: the underscores in the following Answers represent spaces 16. Thi 17. 57 18. of_he 19. anguage_t 20._resistor tow is 500.00 volts 21. (IF (< answer 10) (SETQ variable 11) ) 22. (IF (AND (< answer 6)(> answer 5)) (PROGN (SETQ VariableOne 7) (SETQ VariableTwo 20) ) ) 23. (IF (AND (< answer 6)(> answer 2)) (PROGN (SETQ VariableOne 15) (SETQ VariableTwo 50) ) (PROGN (SETQ VariableOne 1) (SETQ VariableTwo 2) ) ) 24. (IF (OR (< answer 6)(> answer 2)) (PROGN (SETQ VariableOne 15) (SETQ VariableTwo 50) ) (PROGN (SETQ VariableOne 1) (SETQ VariableTwo 2) ) ) 25. ("this is an" "example list" "1" 3 4 5 T) 26. "this is an" 27. "example list" ("example list" "1" 3 4 5 T) "1" (nth exampleList 4) 4 ; error: bad argument type: consp nil nil T "example list" (setq two (list 'A 'B 'C 'D)) (append one two) (list one two) (append (list one two) three) (append (append (list one two three) three)one) (length (append (append (list one two three) three)one)) (CADDR (append (append (list one two three) three)one)) (list (append (append (list (list one two three) three (append one two) two three) three) two) three one) Chapter Four Definitions Association List - is a list in which the elements that are contained within are linked by an index. Dotted Pair A special type of sub-list contained within an association list in which the two elements are separated by a period. Extended Entity Data Provides the programmer with a means of storing and managing information in an objects association list using DXF codes. The attached information can be relevant or non-relevant to the particular entity. Graphic Entity is a visible object used to create a drawing (Lines, polylines, etc.). Loop is the continuous execution of a program or a portion of a program as long as a predefined test condition holds true. Non-Graphic Entities is any object that is not visible to the AutoCAD user (Layer, Linetype, Dimension Styles, Text Styles, Etc.). Answers to Review Questions 2. In an association list the elements are linked to an index, where as elements in a list are not. 3. In a dotted pair only one element is association with a unique index where as an association list can have multiple elements associated with an index. 4. When an entity is created using ENTMAKEX an owner is not assigned. 5. A loop can be created in an AutoLISP program by using either the WHILE or REPEATE functions. 6. The NENTSEL function allows a program to directly access a nested entity contained within a complex object. 7. CONS (CONS 8 Example Layer Name) 8. SUBST (SUBST NewListItem OldListItem EntityList) 9. ENTDEL 10. True 11. False, an AutoLISP association list can be modified by using the ENTMOD function. 12. The AutoLISP WHILE function will continue executing a sequence of functions as long as the predefined test conditions holds true, where as the REPEAT function will execute a sequence of functions a predetermined number of times. 13. False, In AutoLISP there is no limit to the number of loops that can be contained (nested) inside another or even one another. 14. False, AutoLISP allows for loops to be placed within either an IF expression or a COND expression. 15. False, The number of expressions that can be evaluated by a WHILE loop or REPEAT function is determined only by the placement of the closing parenthesis. 16. (3 . "The value is 4") 17. ; error: misplaced dot on input 18. ((4 . 0.65) (5 . 0.08)) 19. ((-1 . ) (0 . "LINE") (330 . ) (5 . "2B") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (100 . "AcDbLine") (10 8.17993 5.83581 0.0) (11 4.18605 3.58163 0.0) (210 0.0 0.0 1.0)) 20. 21. ((-1 . ) (0 . "LINE") (330 . ) (5 . "2F") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (100 . "AcDbLine") (10 1.98023 6.95455 0.0) (11 3.3338 4.83395 0.0) (210 0.0 0.0 1.0)) 22. 23. ((-1 . ) (0 . "LINE") (330 . ) (5 . "2B") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (100 . "AcDbLine") (10 8.17993 5.83581 0.0) (11 4.18605 3.58163 0.0) (210 0.0 0.0 1.0)) 24. 25. ("this is an example" "list") 26. ("this is an example" "list") 27. 28. 5 29. ((-1 . ) (0 . "LINE") (330 . ) (5 . "2B") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (100 . "AcDbLine") (10 9.84791 5.59698 0.0) (11 5.12027 2.85854 0.0) (210 0.0 0.0 1.0)) 30. (10 9.84791 5.59698 0.0) 31. ; error: too many arguments 32. ((-1 . ) (0 . "LINE") (330 . ) (5 . "2C") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (100 . "AcDbLine(10 9.9 8.8 0.0) (11 5.12027 2.85854 0.0) (210 0.0 0.0 1.0)) 33. ; error: bad argument type: ((-1 . ) (0 . "LINE") (330 . ) (5 . "2C") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (100 . "AcDbLine(10 9.9 8.8 0.0) (11 5.12027 2.85854 0.0) (210 0.0 0.0 1.0)) 34. 35. (Setq num 10) (While (> num cnt) (setq numberOne (getreal "\nEnter first number : ") numberTwo (getreal Enter second number :) ) ;;;;;; Malformed List (if (= numberOne numberTwo) (Princ "\nThe two number entered are the same : ") (setq answer (* numberOne numerTwo)) ) ;;;;; Malformed List (princ "The products of the two numbers are" (rtos answer)) ) 36. (while (<= loop_cnt list_cnt) (setq resistor (nth loop_cnt resistor_list)) (if (/= resistor nil) (setq equilivent_resistance (+ equilivent_resistance resistor) ) ) (setq loop_cnt (1- loop_cnt)) ) 37. (DEFUN c:CalculateBtu() (SETQ Cnt 1 TotalRFactor 0 ) (REPEAT 10 (SETQ Prompt (STRCAT \nEnter the R value for material # (Itoa Cnt) ) TotalRFactor ( + (GETREAL Prompt) TotalRFactor ) Cnt (1+ Cnt) OutAirTemp (GETREAL \nEnter outside Air Temp : ) InAirTemp (GETREAL \nEnter inside Air Temp : ) WallLength (GETREAL \nEnter wall length : ) WallHeight (GETREAL \nEnter wall height : ) WallArea ( * WallLength WallHeight) Ufactor (/ 1.0 TotalRFactor) DeltaTemp (ABS (- OutAirTemp InAirTemp)) BtuPerHour (* WallArea Ufactor DeltaTemp) ) ) ) 38. (DEFUN C:ChangeLine () (SETQ Entity (ENTSEL \nSelect line to change)) (If (/= Entity Nil) (PROGN (SETQ Ent (ENTGET (CAR Entity))) (IF (= (CDR (ASSOC 0 Ent)) LINE) (PROGN (SETQ PointOne (GETPOINT \nSelect first point of Line) PointTwo (GETPOINT \nSelect second point of line) PointOne (CONS 10 PointOne) PointTwo (CONS 11 PointTwo) Ent (SUBST PointOne (Assoc 10 ent) ent) Ent (SUBST PointTwo (Assoc 10 ent) ent) ) (ENTMOD Ent) (ENTUPD (CAR Ent)) ) (ALERT A line must be selected) ) ) (ALERT Nothing Selected) ) ) 39. (DEFUN c:CalculateBtu() (SETQ Cnt 1 TotalRFactor 0 ) (REPEAT 10 (SETQ Prompt (STRCAT \nEnter the R value for material # (Itoa Cnt) ) TotalRFactor ( + (GETREAL Prompt) TotalRFactor ) Cnt (1+ Cnt) OutAirTemp (GETREAL \nEnter outside Air Temp : ) InAirTemp (GETREAL \nEnter inside Air Temp : ) WallLength (GETREAL \nEnter wall length : ) WallHeight (GETREAL \nEnter wall height : ) WallArea ( * WallLength WallHeight) Ufactor (/ 1.0 TotalRFactor) DeltaTemp (ABS (- OutAirTemp InAirTemp)) BtuPerHour (* WallArea Ufactor DeltaTemp) ) ) ;********************************************** ; ; ; New Section for writing Result to either the screen ; or an ASCII Text file. ; ; ;********************************************** (SETQ Answer (GETSTRING \nWrite results to either a ile or raphic screen : ) ) (IF (OR (= Answer F) (= Answer f) (PROGN (SETQ File1 (OPEN OutPut.Txt w)) (Write-Line BtuPerHour File1) (Close file1) ) (PROGN (PRINC (STRCAT \nThe total btu per hour heat loss is (RTOS BtuPerHour) ) ) (PRINC) ) ) Chapter Five Definitions Symbol Table is similar to a filing cabinet for AutoCAD in the respects that it is used to store information regarding non-graphic (Layers, Linetypeas, Styles, Viewports, Views, Dimension Styles, User Coordinates Systems and Applications). Application Identification Table A table used by AutoCAD to store the names of all applications that have been registered in an AutoCAD drawing. Application Name In AutoCAD all extended entity data must be assigned an application name. The application name can only be used once in a drawing. This helps ensure that information assigned by more than one program to the same AutroCAD entity is unique. Dictionary Is similar in concept to a symbol table, however the dictionary is used to store non-graphic information that cannot be contained within a symbol table. Extended Entity Data Provides the programmer with a means of storing and managing information in an objects association list using DXF codes. The attached information can be relevant or non-relevant to the particular entity. Filters Allows the developer to perform either a broad or narrow asearch of a drawings database. Answers to Review Questions 2. See above 3. (REGAPP VisualLisp) The REGAPP function when supplied with an application name, first checks the APPID table to determine if the application name is already in use. If the application name is not in use, then the function adds the name to the table and returns the name that was added. If the application name already exist, then the function returns NIL. 4. See Above 5. (SETQ Ans (TBLSEARCH Appid VisualLISPExample)) (IF (/= Ans Nil) (REGAPP VisualLispExample) (PRINC \nApplication is already registered) ) 6. False, The ENTMOD function can be used to modify extended entity data. 7. True 8. Extended Entity Data is designed to allow the developer to store non AutoCAD information in an objects association list by using DXF codes. Extended Entity Data is an extension of an objects association list. In its native form an entity association list will only contain relevant AutoCAD information. 9. SSGET (SETQ SelectionOne (SSGET X)) 10. The TBLSEARCH function searches a symbol table for a specific entity name, where as the TBLNEXT, function when supplied with a valid sub-table name returns the next entity residing in that table. 11. 12. 13. 14. ; error: bad point argument 15. 16. 17. 18. 19. 20. (_> 21. 4 22. 4 23. 24. ; error: bad argument type: lentityp nil 25. ((-1 . ) (0 . "LINE") (330 . ) (5 . "2E") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (100 . "AcDbLine") (10 8.49744 7.10482 0.0) (11 4.65396 6.52041 0.0) (210 0.0 0.0 1.0)) 26. C:CREATE_XRECORD ------( then ; error: bad argument type: lentityp nil 27. ; error: too few arguments 28. ((0 . "LAYER") (2 . "0") (70 . 0) (62 . 7) (6 . "Continuous")) 29. ; error: bad argument type: lentityp nil 30. ; error: bad xdata list: 31. (SETQ SelEntity (ENTSEL \nSelect Line on Wall)) (IF (/= SELENTITY Nil) (PROGN (REGAPP BtuPerHour) (SETQ Exdata (LIST (LIST BtuPerHour (CONS 1000 (STRCAT The total BTU/HR Heat loss is (RTOS BtuPerHour) ) ) ) ) ) (SETQ NewEnt (APPEND SelEntity (LIST (APPEND (-3) Exdata) ) ) ) (ENTMOD NewEnt) (PRINC) 32. (DEFUN C:ChangeLayers() (PRINC \nSelect entity to change) (SETQ SelSet (SSGET) EntSelected (ENTSEL) ) (WHILE (> EntSelected Nil) (SETQ EntSelected (ENTSEL)) ) (SETQ EntData (ENTGET (CAR EntSelected) ) Layer (CDR (ASSOC 8 EntData) ) (COMMAND Chprop SelSet La Layer ) ;See Note ) Note: The Bolded Text above can be replaced with the following section. (SETQ Cnt 1 NewLayer (CONS 8 Layer) ) (While (> SSLENGTH Cnt) (SETQ EntName (SSNAME Selset (1- Cnt)) EntDataSel (ENTGET ENTGET EntName) OldLayer (ASSOC 8 EntDataSel) EntDataSel (SETQ EntDataSel (SUBST NewLayer OldLayer EntDataSEl) ) (ENTMOD EntDataSel) (ENTUPD (CDR (ASSOC -1 EntDataSel))) (Setq Cnt (1+ Cnt)) ) ;End of While Loop Chapter Six Definitions Attributes An argument for a DCL tile. They are used in DCL to define a DCL tile function and layout. AutoCAD PDF AutoCAD Programmable Dialog Box Facility contains the predefined tiles used to construct a Diametric Dialog Box. Boxed_column Is identical to column in all respects except a border is created around the group of tiles. Children A set of controls or tiles that are contained within another set of controls or tiles. Concatenation A line of text made up of two or more concatenated text_part tiles. The purpose is to allow the programmer to supply a standard message to a dialog box that contains a portion that might be changed during runtime. DCL Dialog Control Language, a language used to construct dialog boxes inside of AutoCAD. DIESEL Direct Interpretively Evaluated String Expression Language, a language used to modify AutoCAD status bar. Julian Date A date format in which a real number is used to represent the current date. In Julian format the integer portion represents the number of days that have passed since the beginning of the first Julian Cycle, January 1, 4713 BC. The fractional portion represents the portion of a 24-hour day that has elapsed for the current Julian day. Julian Time Can be calculated using the formula using the formula (H + (M + S/60)/60)24 Prototypes A custom tile used in a dialog. Prototypes are typically defined when the developer wants to keep a certain consistency among several different dialog boxes or when a particular arrangement of tiles is to be used over and over again in different dialog boxes. Status Line The lower region of the AutoCAD window used to display information concerning the current state of AutoCAD to the user. Subassemblies A grouping of tiles into rows and columns. Subassemblies can either be enclosed or not enclosed by a border. Tree Structure A phrase used to describe the relationship of the child/parent objects an/or tiles. Typically associated with the windows directory structure. Parent The main tile as object that contains one or more children. Answers to Review Questions 2. DCL is used solely for the definition of dialog boxes whereas AutoLISP is used to develop applications that interface with or without dialog boxes. 3. Diesel is used solely for the customization of the AutoCAD status bar, whereas AutoLISP is used to develop applications that interface with or without dialog boxes. 4. Often the GUI interface is the only direct contact that the end user will have with an application. Therefore, if the interface is difficult to follow the user is more likely to not want to use the application. 5. The length of a string that can be passed to the MODEMACRO system cariable is limited by restrictions that are imposed by AutoLISP and the AutoLISP to AutoCAD communication buffer (255 characters). 6. MODEMACRO 7. True 8. False, DIESEL function can be nested within one another. 9. True 10. True 11. A custom tile used in a dialog. Prototypes are typically defined when the developer wants to keep a certain consistency among several different dialog boxes or when a particular arrangement of tiles is to be used over and over again in different dialog boxes. 12. To place a comment in a DCL file, the developer uses two forward slashes. When the comment is embedded within a line of DCL code it is separated from the code with a /* at the beginning of the comment and a */ at the end. 13. When supplied with a text string specifies the Key or tile that is Initially highlighted and therefore will be activated once the user presses enter. 14. A radio button is typically used by a programmer when it is necessary to limit the end user to only one possible selection from a group of options. 15. A list box is a component that is used to display text strings arranged in a vertical row. The list as well as the list box can be variable in length or a fixed length. A pop list when display at runtime will look similar to an edit box that has a downward pointing arrow displayed to its right. 16. User input can be entered into a dialog box by using either a edit box, toggles, radio buttons, buttons, image buttons, list boxes and popup list. 17. True 18. "This is an example or DIESEL"  19. "Drawing Name = $(getvar, dwgname"  20. "Drawing Name = ($getvar dwgname), Dim = $(getvar, dimstyle)"  21.  22. nil 23. 2.0001e+007 24. ; error: bad argument type: stringp 2.0001e+007 25.  26. "M=\nCurrent Time : $(edtime, $(getvar, date), DDDD MONTH DD YYYY HH:MM:SS AM/PM)"  27. "$(if, $(=, ans 1), The value of variable ans = 1"  Chapter Seven Definitions Action Expression Used to associate an AutoLISP expression with a specific tile definition in a dialog box. Callback Function Information regarding the action that the user has performed is returned to an action expression in the form of a callback function. Callback functions are most often used to update information within a dialog box. Static A tile doesnt change from initialization to initialization. Dynamic A tile changes or can change from initialization to initialization. Answers to Review Questions 2. Load the dialog box definition into memory, assign it an identification number, activate the dialog box, initialize its tiles, load images, specify the dialog boxes actions, verify the data entered, end the dialog sessions, extract the data entered and finally unload the dialog boxs definition. 3. If an error should occur when working with a nested dialog box. It is possible for control to not be reestablished to the parent dialog. At that point it may become necessary to terminate all current dialog boxes and return control to the AutoCAD command prompt. 4. DONE_DIALOG (done_dialog [status]) 5. START_DIALOG 6. False, Control is redirected to the dialog box. 7. It is the identification number that is used whenever subsequent function calls are made to the dialog box. 8. Because some dialog boxes may contain custom tiles and/or standard tiles that have been redefined. 9. False, any calls to a SET_TILE function must be placed between the NEW_DIALOG and START_DIALOG function calls. 10. Start a list, then appends the entries to that list and finally close the list. 11. The creation of the image must be started, the image must then be defined and finally the creation process must be stopped. 12. Information regarding the action that the user has performed is returned to an action expression in the form of a callback function. Callback functions are most often used to update information within a dialog box. 13. Used to associate an AutoLISP expression with a specific tile definition in a dialog box. 14. By using the ACTION_TILE function. (action_tile key action-expression) 15. The initial value of a tile contained within a dialog box can be set using the DCL attribute VALUE. When this method is employed, the value assigned to a dialog boxs tiles is static and can not be changed from initialization to initialization or runtime. When the value of a tile is to change from initialization to initialization or runtime, then the AutoLISP SET_TILE function (set_tile key value) must be used. 16. False, It must be placed in an action expression or a callback function. 17. False, Activating a dialog box control function form either the AutoCAD command prompt or the Visual LISP Console window can cause AutoCAD to freeze up. 18. A screen capture of the AutoCAD graphic editor saved in a special format that can be viewed later from within AutoCAD. 19. A tile can be disabled either using the DCL attribute is_enabled of the AutoLISP function mode_tile. The is_enabled attribute is used for static conditions. Once this value is set the tile will remain disabled until the AutoLISP function MODE_TIEL is used to change the tiles state. 20. If the dialog box has been unloaded from memory then the dialog must be reloaded, redefined and process used to display the dialog the first time reissued. However, if the dialog still resides in memory then a call to the START_DIALOG function will redispay the dialog box. Chapter Eight Definition IDE Integrated Development Environment, A development package that includes a fully integrated text editor, compiler, debugger and numerous other tools. OOP Object Oriented Programming, API Application Program Interface Answers to Review Questions 2. False, Visual LISP is an extension of the AutoLISP programming language. It is considered the next evolutionary phase of the AutoLISP programming language. 3. Syntax CheckerFile CompilerSource Code DebuggerText File EditorAutoLISP FormatterComprehensive inspection and watch toolsContext-Senitive HelpProgram ManagerObject Oriented Programming ConceptsActiveX functionsReactors 4. VLIDE for Versions 14.01 and 2000 VLISP for version 2000 only 5. MenusAllows the developer to select Visual LISP commandsToolbarsAllow the developer to select frequently used Visual LISP commandsMain MenuUsed to house the text editor, console window and debug windowConsole WindowDesigned to allow the developer to test and evaluate AutoLISP expressionsTrace WindowDesigned to display the output of the trace functionText EditorA sophisticated programming tool integrated into a word-processing application specifically designed for the creation of AutoLISP programs.Status BarUsed to display the current state of the Visual LISP IDE. 6. False, Toolbars are divided into five areas: Standard, Search, Tools, Debug and View. 7. False, The Visual LISP toolbars are shortcuts to frequently used Visual LISP commands. 8. CTRL + ALT + F 9. CTRL + SHIFT + F 10. It makes the source code easier to interrupt. 11. It allows the developer to rapidly identify the different components of the computer program by distinguishing the major components of an AutoLISP program. 12. Plain StylePlaces all arguments on the same line separated by a mere space. This style is applied when the last character of an expression does not exceed the right margin the value of the approximate line length environment is free of embed comments with new line characters.Wide StyleArranges arguments so that the first argument is contained on the same line as the function. Any remaining arguments associated with the function are place in a column directly below the first argument. This style is applied when the Plane style cannot be employed and the first element is a symbol whose length is less than the maximum wide style car length environment option.Narrow StylePlaces the first argument on the line following the function with all remaining arguments arranged in a column positioned below the first argument. This style is applied when the Plane and Wide Styles cannot be used. This style is also applied to all PROGN expressions.Column StyleFormats the code so that all elements are placed in a column. This style is used for quoted list and all CONS expressions. The formatter chooses the correct style to apply according to the rules established by the format options dialog box. 13. Allows the developer to keep track of parenthesis used to group expressions and functions together. 14. CTRL + ] 15. False, To display the value of a variable in the console window only the variables name is required at the console windows command prompt. 16. False, Multiple searches can be performed in Visual LISP. 17. Bookmarkers are non-printable character that are used as anchors that allow the developer to review a particular section of an application without scrolling through all the source code. 18. CTRL + COMMA 19. CTRL + SPACEBAR 20. Is the mechanism used be Visual LISP to keep track of all symbol used by AutoLISP. 21. By pressing CTRL + SHIFT + SPACEBAR 22. It allows the developer to monitor the value of a variable during a program execution. 23. Visual LISP inspection tools allow the developer to navigate, view and modify both AutoLISP and AutoCAD object. 24. It is a historical record of the execution of expressions and functions that have been evaluated during the execution of an AutoLISP application. The stack is used by AutoLISP as a means of remembering it way out of nested functions. 25. When an error occurs in an application the content of the stack are flushed. To retain a copy of the trace stack when a program crashes the contents can be written out to the debug window using the error trace stack (Error Trace) feature. 26. False, Visual LISP provides four different browsers for viewing the contents of the AutoCAD database. 27. A project is nothing more than a list of AutoLISP source code files that are associated with a particular application and a set of rules as to how those files are to be compiled. 28. FAXCompiled AutoLISP programs. VLXStandalone AutoCAD applications.PRJContains the location and names of all source files that build the project - as well as certain parameters and rules on how to compile the project. 29. Compiled applications execute faster than non-compiled applications. Also the developer is able to hide their source code from end user, thereby giving the developer a means of security. 30. This option instructs the AutoLISP compiler to refuse optimizing the source code if there is a chance that doing so could produce an incorrect FAS file. Chapter Nine Definitions Object Oriented Programming a method of programming in which the actual data used by an application is the major concern instead of the actual process involved to manipulate the data. ActiveX - Is an outgrowth of two other Microsoft technologies called OLE (Object Linking and Embedding) and  HYPERLINK "http://webopedia.internet.com/TERM/A/Component_Object_Model.html" COM (Component Object Model). Event Driven Programming A program remains idle until the operator performs some action that triggers an event, such as moving a mouse, or pressing a button. Structured Programming A method of programming in which all programs are assumed to be interpreted by the computer starting from the beginning of the application and proceeding until it reaches the end. Statements and expressions are executed one after the other following the order in which they are presented. Class Is a template used to create an object. Classes are groups of relate objects that share common properties and methods. Object Is an individual member of a class or an instance of that class. Objects consists of two primary parts, the properties and methods. Method Are the procedures or function used to manipulate the data associated with an object. Properties The information regarding the characteristics of an object. Data Information consisting of character, number, images, etc. used by a computer program for processing. Spaghetti Programming A method of programming in which programs are not written to a set standard, thereby producing applications that are unreliable and difficult to maintain. Array Safe Array Encapsulation a method of ensuring the integrity of an objects properties from unauthorized or even inappropriate access by letting the object control how data associated with the object is accessed. Polymorphism Is when a program treats different objects as if they were identical and each object reacts as it was originally intended. Object Linking and Embedding was intended as a means of creating compound documents. Compound Object Modeling COM (compound object modeling) provided a means of establishing interaction between software libraries, applications, system software, etc. COM does this by defining a standard by which applications can communicate with one another. Parent Object The original object in which an object is created from. Child Object An object that is created from other objects. Inspection Tool A Visual LISP tool that is used to examine the properties of an object. Visual Basic A programming Language developed by Microsoft for the rapid development of Windows based applications. Visual Basic Application A version of Visual Basic designed to allow a programmer to develop programs designed for specific applications (Word, Excel, PowerPoint, AutoCAD, etc.). Variant Is a variable that can contain different data types. Wrapper Function Is a standard function that encapsulates the code used by the application object (the VLA functions in Visual LISP are merely wrapper functions created from the AutoCAD type library) Collection - Is a grouping of all related AutoCAD objects into categories. Answers to Review Questions 2. After a wrapper function has been created Visual LISPs Apropos feature can be used to list the ActiveX wrapper functions that have been. 3. In AutoLISP this is done by using the vlax-import-type-library (vlax-import-type-library :tlb-filename filename [ :methods-prefix mprefix :properties-prefix pprefix :constants-prefix cprefix])function. 4. The vlax-invoke-method function provides the developer with a means of calling ActiveX methods 5. Structured programming allowed the developer to create applications in a modular fashion, meaning that the program is broken up into manageable portions. Each portion was defined as a subroutine that can be called by the main program. Structured programming also provided the developer with an avenue for making decisions based upon information that has been tested against a specific condition. Finally, structured programming introduced the concept of loops. 6. 7. The methods are the procedures or functions used to manipulate the data associated with an object. To access the methods associated with an object created by an application other than AutoCAD, the vlax-invoke-method function should be used. 8. ActiveX is a COM based technology. 9. The vlax-get-object function establishes a connection to a currently running instance of an external application. If the application is not currently running or if the vlax-get-object function should return nil, then a connection to the specified application can be created through the AutoLISP function vla-create-object. This function creates a new instance of the target application object, after which it creates a connection to the instance. 10. False, the VLAX-GET-OBJECT just tries to establish a connection where as the VLAX-GET-OR-CREATE-OBJECT attempts to make a connection to the specified application object. If the connection cannot be established, then the function creates an instance of the application and then establishes a connection. 11. False, AutoCAD is an integral part of the AutoLISP programming language and therefore AutoCAD must be running. 12. False, The VL-LOAD-COM function must be loaded before ActiveX controls can be used in an AutoLISP application. 13. By either importing the applications type library or using AutoLISP to make direct contact with that objects methods, properties, or constants. When an objects type library is imported into Visual LISP, AutoCAD automatically generates a set of wrapper functions for the imported features. Once the application objects library has been imported into Visual LISP, then the wrapper function created can be accessed by the AutoLISP application and Visual LISPs symbol features. Importing an applications objects library can be beneficial to the developer; however, it can also have a dramatic impact on the application being developed by incorporating unnecessary methods, properties, and constants, thus adding to the amount of memory required by the application. To circumvent the adverse affects of loading an entire application objects library, AutoLISP has three functions that allow the developer to access an applications object without loading the applications object library. They are vlax-invoke-method (vlax-invoke-method obj method arg [arg...]), vlax-get-property (vlax-get-property object property), and vlax-put-property (vlax-put-property obj property arg). 14. It frees valuable memory. 15. True 16. False, The vlax-import-type-library function allows the developer to specify the prefixes to append to the objects methods, properties, and constants. 17. True 18. True 19. (vl-load-com) (SETQ application (VLAX-GET-ACAD-OBJECT) ;assigns a pointer to the AutoCAD Application document (VLA-GET-ACTIVEDOCUMENT application) ;Connects to the current active document modelspace (VLA-GET-MODELSPACE document) ) 20. (vl-load-com) (if (equal nil MS-Wordc-wd100Words) (vlax-import-type-library :tlb-filename "C:\\Program Files\\Microsoft Office\\Office\\msword8.olb" :methods-prefix "MS-Wordm-" :properties-prefix "MS-Wordp-" :constants-prefix "MS-Wordc-" ) ) 21. ;;;******************************************************************** ;;; ;;; Program Name: VL05.lsp ;;; ;;; Program Purpose: This program allows the user to construct a ;;; simple gear train, from the Pinion Gear RPM, ;;; the gear ratio, the diametral pitch, shaft ;;; diameter, and number of teeth on the pinion ;;; gear. The two gears are constructed as blocks, ;;; and the rpms, number of teeth and gear ratio ;;; of both gears are saved to the newly constructed ;;; entities in the form of extended entity data. ;;; ;;; Program Date: 2/31/99 ;;; ;;; Written By: James Kevin Standiford ;;; ;;;******************************************************************** ;;;******************************************************************** ;;; ;;; Main Program ;;; ;;;******************************************************************** (DEFUN c:gear (/ rpm number_teeth gear_ratio dia_pitch shaft_dia PT pitch_dia gear_teeth gear_out Pinion_out gear_rpm dist pt_x pt_y pinion gear shaft_pinion Shaft_gear lastent exdata1 newent1 exdata newent ) (vl-load-com) (SETQ application (VLAX-GET-ACAD-OBJECT) document (VLA-GET-ACTIVEDOCUMENT application) modelspace (VLA-GET-MODELSPACE document) rpm (GETREAL "\nEnter RPM of Pinion Gear : ") number_teeth (GETREAL "\nEnter Number of Teeth : ") gear_ratio (/ 1 (GETREAL "\nEnter Gear Ratio : ")) dia_pitch (GETREAL "\nEnter Diametral Pitch : ") shaft_dia (GETREAL "\nEnter Shaft Diameter : ") PT (GETPOINT "\nSelect Point : ") ;;;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ;;; Calculates the pitch diameter, number of teeth on the gear, ;;; the outside diameter of the gear the outside diameter of the ;;; pinion, the distance between the pinion and the gear and the ;;; position of the gear ;;;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pitch_dia (/ number_teeth dia_pitch) gear_teeth (* gear_ratio number_teeth) gear_out (+ pitch_dia (* 2 (/ 1 (/ gear_teeth pitch_dia)))) pinion_out (+ pitch_dia (* 2 (/ 1 (/ number_teeth pitch_dia)))) gear_rpm (* gear_ratio rpm) dist (+ (* 0.5 pinion_out) (* 0.5 gear_out)) pt_x (+ dist (CAR pt)) pt_y (CADR pt) ) ;;; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ;;; Begins the construction of the pinion block ;;; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (VLA-ADDCIRCLE modelspace (VLAX-3d-Point pt) (/ pinion_out 2) ) (setq lastent (entget (entlast))) ;;;;;; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ;;;;;; Modifies the entity created by attaching XDATA ;;;;;; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (regapp "pinion") (setq exdata1 (LIST (LIST "pinion" (CONS 1000 (STRCAT "Pinion's RPM " (RTOS rpm))) (CONS 1041 gear_ratio) (CONS 1042 number_teeth) ) ) ) (setq newent1 (append lastent (list (append '(-3) exdata1))) ) (entmod newent1) (VLA-ADDCIRCLE modelspace (VLAX-3d-Point (LIST pt_x pt_y)) (/ gear_out 2.0) ) ;;;;;; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ;;;;;; Modifies the entity created by attaching XDATA ;;;;;; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (setq lastent (entget (entlast))) (regapp "gear") (setq exdata (LIST (LIST "gear" (CONS 1000 (STRCAT "Mating Gear's RPM " (RTOS rpm))) (CONS 1041 gear_ratio) (CONS 1042 gear_teeth) ) ) ) (setq newent (append lastent (list (append '(-3) exdata))) ) (entmod newent) (VLA-ADDCIRCLE modelspace (VLAX-3d-Point pt) (/ shaft_dia 2.0) ) (VLA-ADDCIRCLE modelspace (VLAX-3d-Point (LIST pt_x pt_y)) (/ shaft_dia 2.0) ) (princ) ) 22. ;;;******************************************************************* ;;; Program Name: ActiveXSeries.lsp ;;; Program Purpose: Calculate the voltage drop for a group of ;;; resistors, equivalent resistance, ;;; Total Current ;;; ;;; Programmed By: James Kevin Standiford ;;; Date: 3/21/2000 ;;;******************************************************************** (defun c:series (/ volt l_length) (setvar "cmdecho" 0) ;;;***~~~~~~New~~~~~~***~~~~~~~NEW~~~~~~~~***~~~~~~~~NEW~~~~~~ (vl-load-com) (if (equal nil MS-Wordc-wd100Words) (vlax-import-type-library :tlb-filename "C:\\Program Files\\Microsoft Office\\Office\\msword8.olb" :methods-prefix "MS-Wordm-" :properties-prefix "MS-Wordp-" :constants-prefix "MS-Wordc-" ) ) (setq MS-Word (vlax-get-or-create-object "Word.Application.8")) (vla-put-visible MS-Word :vlax-true) (setq documents (vla-get-documents MS-Word) new-document (MS-Wordm-add documents) paragraphs (MS-Wordp-get-paragraphs new-document) page (MS-Wordp-get-last paragraphs) range (MS-Wordp-get-range page) res (ssget "x" (list (cons 0 "insert") (cons 2 "resistor"))) ) ;;;***~~END New~~~~~~***~~~END NEW~~~~~~~~***~~~~END NEW~~~~~~ (if (/= res nil) (progn (setq rcnt 0 volt (getreal "\nEnter voltage : ") l_length (sslength res) ent (entget (entnext (cdr (assoc -1 (entget (ssname res rcnt))))) ) r_list (list (atof (cdr (assoc 1 ent)))) ent_name_list (list (cdr (assoc -1 (entget (entnext (cdr (assoc -1 ent)))) ) ) ) r_num (list (cdr (assoc 1 (entget (entnext (cdr (assoc -1 (entget (entnext (cdr (assoc -1 ent))) ) ) ) ) ) ) ) ) rcnt (1+ rcnt) ) (while (< rcnt l_length) (setq ent (entget (entnext (cdr (assoc -1 (entget (ssname res rcnt))))) ) r_list (append r_list (list (atof (cdr (assoc 1 ent)))) ) ent_name_list (append ent_name_list (list (cdr (assoc -1 (entget (entnext (cdr (assoc -1 ent))) ) ) ) ) ) r_num (append r_num (list (cdr (assoc 1 (entget (entnext (cdr (assoc -1 (entget (entnext (cdr (assoc -1 ent)) ) ) ) ) ) ) ) ) ) ) rcnt (1+ rcnt) ) ) (setq list_cnt (- (length r_list) 1) eq_res (nth 0 r_list) l_cnt 1 ) (while (<= l_cnt list_cnt) (setq resistor (nth l_cnt r_list)) (if (/= resistor nil) (setq eq_res (+ eq_res resistor) ) ) (setq l_cnt (1+ l_cnt)) ) (setq name (GETVAR "dwgname") length_string (STRLEN name) name_truncated (SUBSTR name 1 (- length_string 3)) result_file (open (STRCAT (getvar "dwgprefix") name_truncated ".RLT" ) "a" ) amperage (/ volt eq_res) ) (princ "\n" result_file) (setq string (strcat (princ (strcat "\nThe equivalent resistance for the circuit on Drawing : " (getvar "dwgname") " is " (rtos eq_res) " ohms" ) result_file ) (princ (strcat "\nThe voltage for this circuit is " (rtos volt)) result_file ) (princ (strcat "\nThe total current for this circuit is " (rtos amperage) " amps" ) result_file ) ) ) (setq l_cnt 0) (while (<= l_cnt list_cnt) (setq string (strcat string (princ (strcat "\nThe voltage drop for resistor " (nth l_cnt r_num) " is " (setq g (rtos (* (nth l_cnt r_list) amperage ) ) ) ;;;~~~~~~~~~~~~NEW~~~~~~~~~~~~~~~~NEW~~~~~~~~~~~~~~~NEW~~~~~~~~ " volts it resistance is " (rtos (nth l_cnt r_list)) " OHMS The Current for this resistor is " (RTOS amperage) " AMPS" ;;;~~~~~~~END~~NEW~~~~~~~~~~~END~~NEW~~~~~~~~~~END~~NEW~~~~~ ) result_file ) ) ) (setq resistor_ent (nth l_cnt ent_name_list) entg (entget resistor_ent) entg (subst (cons 1 g) (assoc 1 (entget resistor_ent)) entg) ) (entupd (cdr (assoc -1 (entmod entg)))) (setq l_cnt (1+ l_cnt)) ) ;;;***~~~~~~New~~~~~~***~~~~~~~NEW~~~~~~~~***~~~~~~~~NEW~~~~~~ (MS-Wordm-InsertAfter range string) ;;;***~~END New~~~~~~***~~~END NEW~~~~~~~~***~~~~END NEW~~~~~~ (alert string) (close result_file) (command "modemacro" (strcat "The voltage used for this circuit was " (rtos volt) " volts" ) ) (princ) ) ) (if (= res nil) (alert "No Resistors Found : ") ) (princ) ) (princ "\nEnter series to start program :") (princ) Chapter Ten Definitions *VLR-Toolbar-Reactor - Constructs an editor reactor object that notifies of a change to the bitmaps in a toolbar *:VLR-Undo-Reactor - Constructs an editor reactor object that notifies of an undo even *:VLR-Wblock-Reactor - Constructs an editor reactor object that notifies of an event related to writing a block *:VLR-Window-Reactor - Constructs an editor reactor object that notifies of an event related to moving or sizing an AutoCAD window *:VLR-XREF-Reactor - Constructs an editor reactor object that notifies of an event related to attaching or modifying XREFs *:VLR-AcDb-Reactor - Constructs a reactor object that notifies when an object is added to, modified in, or erased from a drawing database *:VLR-Command-Reactor - Constructs an editor reactor that notifies of a command event *:VLR-DeepClone-Reactor - Constructs an editor reactor object that notifies of a deep clone event *:VLR-DocManager-Reactor - Constructs a reactor object that notifies of events relating to drawing-documents *:VLR-DXF-Reactor - Constructs an editor reactor object that notifies of an event related to reading or writing a DXF file *:VLR-Editor-Reactor - Constructs an editor reactor object *:VLR-Insert-Reactor - Constructs an editor reactor object that notifies of an event related to block insertion *:VLR-Linker-Reactor - Constructs a reactor object that notifies your application every time an ObjectARX application is loaded or unloaded *:VLR-Lisp-Reactor - Constructs an editor reactor object that notifies of a LISP event *:VLR-Miscellaneous-Reactor - Constructs an editor reactor object that does not fall under any other editor reactor types *:VLR-Mouse-Reactor - Constructs an editor reactor object that notifies of a mouse event (for example, a double-click) *:VLR-Object-Reactor - Constructs an object reactor object *:VLR-SysVar-Reactor - Constructs an editor reactor object that notifies of a change to a system variable Callback Events - The events associated with a reactor type. Database Reactors - An event that performs a generic change to the AutoCAD drawing database. Document Reactors - When the user changes the status of a document (drawing) then a Document Reactor can be used to notify the application that such an event has occurred. Editor Reactors - When the user activates an AutoCAD command or activates an AutoLISP application, then an Editor Reactor can be used to notify an application that a command has been issued. Linker Reactors - AutoCAD also provides a means of notifying an application whenever an ObjectARX application has been loaded and/or unloaded by using Linker Reactor identifier. Object Reactors - Object reactors notify an application whenever a specific object in the database has been changed, copied, deleted or modified in any way. Reactor - Is an object that is attached to an AutoCAD drawing entity for the express purposes of having AutoCAD contact an application when a specified event occurs. *VL-LOAD-COM - Loads Visual LISP extensions to AutoLISP Note: All definitions starting with a * were taken from the AutoLISP Programmers Reference. Answers to Review Questions 2. Database Reactors Document Reactors Editor Reactors Linker Reactors Object Reactors 3. When a reactor is to be confined to an entity, an object reactor must be constructed. Object reactors are unlike AutoCAD reactors in that the reactor itself is attached to a specific object. 4. Callback functions for reactors are a standard AutoLISP application defined by the DEFUN function. 5. VLAX-ENAME->VLA-OBJECT 6. False, AutoLISP can be used to modify a reactors definition data. 7. By using the VLR-PERS (vlr-pers reactor) function 8. By using the VLR-NOTIFICATON (vlr-notification reactor) function. 9. False, Because reactors use the extended AutoLISP functions provided in Visual LISP, the supporting code that enables reactor calls must first be loaded. 10. True, However, a Reactor can be disabled using the AutoLISP VLR-REMOVE (vlr-remove reactor) function. 11. A list of VLA-Objects to be associated with that particular reactor. 12. ;;;********** ;;; Defining the Reactor Function ;;;********** (defun c:define_reactor () (vl-load-com) (setq vlr-object (vlr-object-reactor (list (vlax-ename->vla-object (cdr (assoc -1 (entget (car (entsel))))) ) ) "Example Line Reactor" '((:vlr-Erased . ModifySeries)) ) ) ) ;;;************ ;;; CallBack Function ;;;************ (defun ModifySeries (notifier reactor parameter) (vl-load-com) (AutoSeries) ) ) ;;;************* ;;; AutoSeries program ;;;************* (defun c:series () (AutoSeries) ) (defun AutoSeries(/ volt l_length) (setvar "cmdecho" 0) (setq res (ssget "x" (list (cons 0 "insert") (cons 2 "resistor"))) ) (if (/= res nil) (progn (setq rcnt 0 volt (getreal "\nEnter voltage : ") l_length (sslength res) ent (entget (entnext (cdr (assoc -1 (entget (ssname res rcnt))))) ) r_list (list (atof (cdr (assoc 1 ent)))) ent_name_list (list (cdr (assoc -1 (entget (entnext (cdr (assoc -1 ent)))) ) ) ) r_num (list (cdr (assoc 1 (entget (entnext (cdr (assoc -1 (entget (entnext (cdr (assoc -1 ent))) ) ) ) ) ) ) ) ) rcnt (1+ rcnt) ) (while (< rcnt l_length) (setq ent (entget (entnext (cdr (assoc -1 (entget (ssname res rcnt))))) ) r_list (append r_list (list (atof (cdr (assoc 1 ent)))) ) ent_name_list (append ent_name_list (list (cdr (assoc -1 (entget (entnext (cdr (assoc -1 ent))) ) ) ) ) ) r_num (append r_num (list (cdr (assoc 1 (entget (entnext (cdr (assoc -1 (entget (entnext (cdr (assoc -1 ent)) ) ) ) ) ) ) ) ) ) ) rcnt (1+ rcnt) ) ) (setq list_cnt (- (length r_list) 1) eq_res (nth 0 r_list) l_cnt 1 ) (while (<= l_cnt list_cnt) (setq resistor (nth l_cnt r_list)) (if (/= resistor nil) (setq eq_res (+ eq_res resistor) ) ) (setq l_cnt (1+ l_cnt)) ) (setq name (GETVAR "dwgname") length_string (STRLEN name) name_truncated (SUBSTR name 1 (- length_string 3)) result_file (open (STRCAT (getvar "dwgprefix") name_truncated ".RLT" ) "a" ) amperage (/ volt eq_res) ) (princ "\n" result_file) (setq string (strcat (princ (strcat "\nThe equilivent resistance for this circuit is " (rtos eq_res) " ohms" ) result_file ) (princ (strcat "\nThe voltage for this circuit is " (rtos volt)) result_file ) (princ (strcat "\nThe total current for this circuit is " (rtos amperage) " amps" ) result_file ) ) ) (setq l_cnt 0) (while (<= l_cnt list_cnt) (setq string (strcat string (princ (strcat "\nThe voltage drop for resistor " (nth l_cnt r_num) " is " (setq g (rtos (* (nth l_cnt r_list) amperage ) ) ) " volts" ) result_file ) ) ) (setq resistor_ent (nth l_cnt ent_name_list) entg (entget resistor_ent) entg (subst (cons 1 g) (assoc 1 (entget resistor_ent)) entg) ) (entupd (cdr (assoc -1 (entmod entg)))) (setq l_cnt (1+ l_cnt)) ) (alert string) (close result_file) (command "modemacro" (strcat "The voltage used for this circuit was " (rtos volt) " volts" ) ) (princ) ) ) (if (= res nil) (alert "No Resistors Found : ") ) (princ) ) (princ "\nEnter series to start program :") (princ) 13. ;;;********** ;;; CallBack Function ;;;********** (defun c:define_reactor () (vl-load-com) (setq vlr-object ((vlr-insert-reactor (list (vlax-ename->vla-object (cdr (assoc -1 (entget (car (entsel))))) ) ) "Example Line Reactor" '((:vlr-endInsert . ModifySeries)) ) ) ) 14. ;;;******************************************* ;;; Define Reactor ;;;******************************************* (defun c:define_reactor () (vl-load-com) (setq vlr-object ((vlr-insert-reactor (list (vlax-ename->vla-object (cdr (assoc -1 (entget (car (entsel))))) ) ) "Example Line Reactor" '((:vlr-Erased . ModGearReactor)) ) ) ) ;;;******************************************* ;;; CallBack Function ;;;******************************************* (defun ModGearReactor (notifier reactor parameter) (vl-load-com) (GearReactor) ) ) ;;;********** ;;; Gear Train program ;;;********** (DEFUN c:gear () GearProgram) ) (DEFUN GearReactor() (setq answer (getString "\nDo you want to rerun the gear program now : ") ) (if (or (= answer "Y")(= answer "y")) (GearPogram) ) ) (DEFUN GearProgram() (SETQ rpm (GETREAL "\nEnter RPM of Pinion Gear : ") number_teeth (GETREAL "\nEnter Number of Teeth : ") gear_ratio (/ 1 (GETREAL "\nEnter Gear Ratio : ")) dia_pitch (GETREAL "\nEnter Diametral Pitch : ") shaft_dia (GETREAL "\nEnter Shaft Diameter : ") PT (GETPOINT "\nSelect Point : ") pitch_dia (/ number_teeth dia_pitch) gear_teeth (* gear_ratio number_teeth) gear_out (+ pitch_dia (* 2 (/ 1 (/ gear_teeth pitch_dia)))) pinion_out (+ pitch_dia (* 2 (/ 1 (/ number_teeth pitch_dia)))) gear_rpm (* gear_ratio rpm) disatance (+ (* 0.5 pinion_out) (* 0.5 gear_out)) pt_x (+ disatance (CAR pt)) pt_y (CADR pt) pinion (LIST (CONS 0 "CIRCLE") (CONS 10 pt) (CONS 40 (/ pinion_out 2)) (CONS 8 "pinion") ) gear (LIST (CONS 0 "CIRCLE") (CONS 10 (LIST pt_x pt_y)) (CONS 40 (/ gear_out 2.0)) (CONS 8 "gear") ) shaft_pinion (LIST (CONS 0 "CIRCLE") (CONS 10 pt) (CONS 40 (/ shaft_dia 2.0)) (CONS 8 "pinion") ) shaft_gear (LIST (CONS 0 "CIRCLE") (CONS 10 (LIST pt_x pt_y)) (CONS 40 (/ shaft_dia 2.0)) (CONS 8 "pinion") ) ) (ENTMAKE (list (cons 0 "block") (CONS 2 "pinion") (cons 10 (LIST pt_x pt_y)) (cons 70 64) ) ) (ENTMAKE pinion) (ENTMAKE shaft_pinion) (ENTMAKE (list (cons 0 "endblk"))) (ENTMAKE (list (CONS 0 "INSERT") (cons 2 "pinion") (cons 10 (LIST pt_x pt_y)) ) ) (setq lastent (entget (entlast))) (regapp "pinion") (setq exdata1 (LIST (LIST "pinion" (CONS 1000 (STRCAT "Pinion's RPM " (RTOS rpm))) (CONS 1041 gear_ratio) (CONS 1042 number_teeth) ) ) ) (setq newent1 (append lastent (list (append '(-3) exdata1))) ) (entmod newent1) (ENTMAKE (list (cons 0 "block") (CONS 2 "gear") (cons 10 (LIST pt_x pt_y)) (cons 70 64) ) ) (ENTMAKE gear) (ENTMAKE shaft_gear) (ENTMAKE (list (cons 0 "endblk"))) (ENTMAKE (list (CONS 0 "INSERT") (cons 2 "gear") (cons 10 (LIST pt_x pt_y)) ) ) (setq lastent (entget (entlast))) (regapp "gear") (setq exdata (LIST (LIST "gear" (CONS 1000 (STRCAT "Mating Gear's RPM " (RTOS rpm))) (CONS 1041 gear_ratio) (CONS 1042 gear_teeth) ) ) ) (setq newent (append lastent (list (append '(-3) exdata))) ) (entmod newent) (princ) ) 15. (defun known (reactor knowncommand_info) (vl-load-com) (SETQ Fil (OPEN "AutoCADOutPut.TXT" "a")) (WRITE-LINE (car knowncommand_info) Fil) (princ) (close Fil) ) (VLR-EDITOR-REACTOR nil '((:vlr-commandEnded . known))) Chapter Eleven Definitions Blackboard- A blackboard is a NameSpace that is separate from documents and VLX applications. Its purpose is to provide documents and applications with a means of sharing data between NameSpaces Error Trapping are user-defined functions that are created using the defun function. Their purpose is to convey to the user information about the condition that caused the error to occur, restore the AutoCAD environment to a known condition, and continue program execution. MDI Multiple Document Interface NameSpace Is a LISP environment that contains an isolated set of symbols (variables and functions). Each open drawing has it own unique NameSpace. Variables and functions defined in one NameSpace are isolated from variables and functions defined in another. SDI Single Document Interface *VL-ARX-IMPORT Imports ObjectARX/ADSRX functions into a separate-namespace VLX *VL-DOC-EXPORT Makes a function available to the current document *VL-DOC-IMPORT Imports a previously exported function into a VLX namespace *VL-DOC-REF Retrieves the value of a variable from the current document's namespace. *VL-DOC-SET Sets the value of a variable in the current document's namespace. *VL-EXIT-WITH-ERROR Passes control from a VLX error handler to the *error* function of the calling namespace *VL-EXIT-WITH-VALUE Returns a value to the function that invoked the VLX from another namespace *VL-LIST-EXPORTED-FUNCTIONS Lists exported functions *VL-LIST-LOADED-VLX Returns a list of all separate-namespace VLX files associated with the current document. *VL-UNLOAD-VLX Unload a VLX application that is loaded in its own namespace *VL-VLX-LOADED-P - Determines whether a separate-namespace VLX is currently loaded. Note: All definitions starting with a * were taken from the AutoLISP Programmers Reference. Answers to Review Questions 2. In a single document interface environment, applications and variables were confined to the current document. Once a document was closed and a new document was opened in its place, any applications that were previously loaded (not using ACAD.LSP) must be reloaded before being executed. 3. Its contents can be automatically loaded by either appending the Acaddoc.lsp file or by using the vl-vload-all (vl-load-all filename) function. 4. By using the vl-doc-export (vl-doc-export 'function) function. 5. By using the vl-doc-ref (vl-doc-ref 'symbol), vl-doc-set (vl-doc-set 'symbol value) and vl-propagate (vl-propagate 'symbol)functions. 6. By using either the the vl-list-loaded-vls and/or vl-list-exposed-functions functions. 7. They provide the developer with a means of controlling unanticipated condition that might cause the program to respond in a manner that could be harmful to the program, output and/or computer. 8. To pass control from a VLXs error-trapping function to the documents error-trapping function, the AutoLISP vl-exit-with-error (vl-exit-with-error msg) function can be used. To pass an error message to the documents NameSpace, the following expressions would be added to the VLX applications source code: (defun *error* (msg). 9. To provide documents and applications with a means of sharing data between NameSpaces. 10. By using the vl-doc-ref, vl-doc-set, and vl-propagate functions. 11. False, AutoLISP is limited to working with one document at a time. An AutoLISP application cannot issue any entity creation or modification functions in a NameSpace different from the one where the application is currently running. Chapter Twelve Definitions Windows registry - is a system of proprietary binary database files whose primary purpose is to ensure the integrity of the computers operating system and applications by storing important settings and information Initialization file - Early versions of Windows (3.X) applications stored this information in initialization (.INI) files. Initialization files are ASCII based text files that are limited in length to 64K. This created a problem: because these files were ASCII text files, they were considered low security and therefore could be edited using any text editor. Anyone using a text editor could easily alter the contents of these files; if the person editing the file made a mistake, then the program would either not function properly or in most cases not start at all Subtree The main Windows registry is comprised of six main components called subtrees: HKEY_LOCAL_MACHINE, HKEY_CLASS_ROOT, HKEY_CURRENT_USER, HKEY_USERS, HKEY_CURRENT_CONFIG, and HKEY_DYN_DATA. Subkey - Each subtree is made up of subkeys. The subkeys contained in each subtree may also contain subkeys or they may contain active keys. It is the active keys that store the actual values associated with a particular application Answers to Review Questions 2. Initialization files are ASCII based text files that are limited in length to 64K. This created a problem: because these files were ASCII text files, they were considered low security and therefore could be edited using any text editor. 3. Information can be stored in a centrilizated location, It is secure from the average user (meaning that information can not be accessed using Notepad, and the application is not limited to storing only 64K at a time. 4. Registry Subtree Subtree NameDescriptionHKEY_LOCAL_MACHINEContains information regarding the local computers hardware and software (bus type, system memory, device drivers, etc.).HKEY_CLASSES_ROOTContains data for OLE and file class association.HKEY_CURRENT_USERContains profile information for the current user (environment variables, desktop settings, network connections, etc.).HKEY_USERSContains all actively loaded user profile information.HKEY_CURRENT_CONFIGContains hardware information used by the local computer during startup.HKEY_DYN_DATAContains points to dynamic information that constantly changes from session to session. 5. vl-registry-descendents (vl-registry-descendents reg-key [val-names]), vl-registry-read (vl-registry-read reg-key [val-name]), and vlax-product-key (vlax-product-key). 6. vl-registry-delete (vl-registry-delete reg-key [val-name]) and vl-registry-write (vl-registry-write reg-key [val-name val-data]) 7. To incorporate VBA applications into an AutoLISP program, Autodesk has provided two functions, vl-vbaload (vl-vbaload filename) and vl-vbarun (vl-vbarun macroname), for loading and executing VBA applications. The vl-vbaload function, when supplied with a string representing the name and location of a Visual Basic project file, loads the project into memory. The vl-vbarun function, when supplied with a string representing the name of a loaded macro, executes that macro. JWXcde7 8  {|56;<AB !11MMYYN]]3p4p]p^pppppqq\q]qqq,-{|@G\k:56 j4U j&,U j$U jU jU j U jU5 jmH>* jDH*H* jUCJ >*CJ >*CJ$G7JKWXdefWXNOUVWXq r 7JKWXdefWXNOUVWXq r   . / @ A zvJ  [\  no        z{deRS  -   . / @ A d e r s t * + 6 7 9 `PDLH8$$l,"$A d e r s t * + 6 7 9 : F G U q 56UVCDde VW|yvs5%&FG45TU5CDPQST_`  %&  I,9 : F G U q 56UVCDde VW)+,de:;dd$$l,"$)+,de:;B/045z#Ŀ}zwtqnk ,0f}012  c  op        !"  s  z~"`cd4*;B/045z#'134$$l,"$#'134G_ #:_}Dtwe¿|yvs>LMNR\5STV`-Kjn,4G_ #:_}Dttwef;<AB  !!I!J!""""ef;<AB  !!I!J!"""""""""" ########$$ $ $F$G$q$$$$%A%C%K%~{xuJ   09: !)*-CSiqr`a-""""""" ########$$ $ $F$G$q$$$$%A%C% & FC%K%P%Q%%%%%%&&#&)&l&o&x&~&&&&'' ( ()))))*K%P%Q%%%%%%&&#&)&l&o&x&~&&&&'' ( ()))))**B*Q*h*j*s*t********+,+;+A+~{xu0;H}~GH34CDrsyS\_.**B*Q*h*j*s*t********+,+;+A+H+I+n+++++,pp@ A+H+I+n+++++,,!,2,:,Y,],`,i,r,,,,,,,,-%-.-/-V-^-u----------../.2.8.9.~{xu:@CZqy|CDMawx!$Q.,,!,2,:,Y,],`,i,r,,,,,,,,-%-.-/-V-^-u-----------../.2.8.9._.g..........//,/I/M/a/c/ & F 9._.g..........//,/I/M/a/c/////////*0c00111ǿwog_WT    H  x                    %  )   F Yj 9 c/////////*0c001111 1!111 2 222J3K333L4 & F 11 1!111 2 222J3K333L4M4i4kRRggss_m_{01bc3 6 &+L4M4i4j444i5j555666666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W5^տ~Zn:-h z:#EH>y\y0uԤyՖ-re:/˶o~5q@/k}?5!%*6(kƇ[T`\IENDB`DdqV  c 2A21.bmpbZI]8nDHIZh067n.I]8nDHIZh0PNG  IHDRqgAMAPLTE3f3333f333ff3fffff3f3f̙3f3333f3333333333f3333333f3f33ff3f3f3f3333f3333333f3̙333333f333ff3ffffff3f33f3ff3f3f3ffff3fffffffffff3fffffff3fff̙ffff3fffff3f̙3333f33̙3ff3ffff̙f3f̙3f̙̙3f̙3f3333f333ff3fffff̙̙3̙f̙̙̙3f̙3f3f3333f333ff3fffff3f3f̙3f (((555CCCPPP]]]kkkxxx𠠤e pHYs+IDATxr Esjs8iݫ-Il0hE8l- o;ߡi9|sv4M9NW;)5Kw^OKqybv}3j(QǶX|-msgfBʜCCs.^EUۜ\uf9_rHMN{s1+sNH_n3{9v򤉄,8hC;"hA;Av h1=30\vh=gv;cLogvɨ!mggj;2zE8^QP= ;w.:*;MY//t6{M,v xUoVOLD7FY,ivoGLhtb+;(coiҎ&"1 SH>@MgQJe=5VQ;eWUv;s_Zհc#d\Ԭ씷&hy348l @jjv*;ukc2=ن`ڱ[v6F*ܵ(; k딀ud;zv|t옩Rk7MkVY;e:TcU'-\\Ơ[Wli5f\q۪ީ]6!*gg:L5Av hA;Av hA;w,io^Ģv^sv ۑ,lqve(>EGs;cӋ}];_ϝu];Yںvށٳ](=:gB}5Sw hA;Av hA;o;/\aE^x"xXIENDB`/Dddm V  c 2A25.bmpb!vZ,":[a;%nYXy6D)D!vZ,":[PNG  IHDRd tgAMAPLTE3f3333f333ff3fffff3f3f̙3f3333f3333333333f3333333f3f33ff3f3f3f3333f3333333f3̙333333f333ff3ffffff3f33f3ff3f3f3ffff3fffffffffff3fffffff3fff̙ffff3fffff3f̙3333f33̙3ff3ffff̙f3f̙3f̙̙3f̙3f3333f333ff3fffff̙̙3̙f̙̙̙3f̙3f3f3333f333ff3fffff3f3f̙3f (((555CCCPPP]]]kkkxxx𠠤e pHYs+IDATxٖ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eD/V)/< 1%5&1l`gm֬3gwҰ;/_atmm{},qD$Eb$,xMLE$wqu0F#PTܞx (VşC*sZ3hCfal.ou0i TXl{n[!>.8m K"H:fݡ_C %M3E0t^^TkmhvV|Ѳ^<55!IH\mцrZ{B_؂^}*A8 ʀ>.Ea(<&Nn}a.4@Ęz9& j۳MIAʠ*dC_fU^-w9 Dǩ* #Mg!ZcBh z&G61AMͩ˖̝ג3\Ϳ9&v-qAC"@e ziCɝCj"Z/i؂^tY=6ϡRЗ~^/]x*\<@< Heading 3$$@&a$ 5CJ\@@@ Heading 4$$@&a$ 5>*CJ \<@< Heading 5$$@&a$ 5CJ \<A@< Default Paragraph Font.>@. Title$a$ 5>*\.U@. Hyperlink >*B*ph3XOAXReviewQuestions1$ hCJOJQJnH :": Footnote Text1$CJnH DC2DBody Text Indent1$ 5CJnH *B@B* Body Textx0AR0Code1$CJOJQJnH NAN Table Head1$<56CJOJQJnH LBLProduction Note 1$xx 56B*nH .P@. Body Text 26& & 9 ;4t"C%*,-c/L4(9>BEHKMTX [&]_jhpqBw'&ʑxIRBQ|'!g }&A #eK%A+9.1&,{&X: @  ; C a g &.lt\d*/INbfgpry| %*+6=AFMPVdknt !(+1ENPWZ`z""##$$%"%%%%%&&_&b&~&&&&u'~'''''''''''''(('(0(C(L(M(V(((((((f)q)})))))) ** *+*o*z*******R+]+++++8/A/0$011222222 33Z3b3J4R44466667 77777 88888899::=:E:::/;9;g;o;;;+<5<c<k<<<<<<<<<<<<<<<<==="=+=-=4=z==============>>>>B>_>g>h>p>u>y>>>>>>>>>>> ?????'?;?I?T?W?_?k?????????@@-@0@8@;@E@O@[@a@@@@@@@@@@@ AA-A5ABALAQA[AeAlA}AAAAAAAAAAAAAAAB&B2BWB^BBBBBCCCC6C>CLCSCuC}CCCCCCCCCCCCCCCCDDDDD D#D9Dch|NRY]w{| '4ER_bjo%-4>ACH]cov ,2<BQW^c $(:AIVky(.?DJU^bqw !,@EJPSWw{%GKLQfkltx| "#) !&*01=@DKQSVX]bhimtxy~!kv &)Z_dilr8B)2wIQ7:19FI  $%(36Q[nqsx}!&'35=TVdn !bepu}  28BFHKMRUXbo~ $,3=@LQ`fhoqtv{ &-/249>DFLMPQUciu{ "&)TYjo tx~ */06TXY_fl&1DJLU^l &LPQWv =Aoz :?@E]aeirwx~ %+,8AEJO\aeklx{ !'[_3;TYZjqs&36B %/BEGLQW^d5:;IKSjlz u.4GP_efo| (+3;DR\]flv| (, ;GNRSWgklsu{}".AEX_)EKR\lv-0duwz t})2 MOnpB J _ a r u     ! $ v      h q 2: 13ILRUqs(+14:=qy *("t) V Y h ~ , 5 Ua}z*/INbf %*=Auyhp'1_&b&&&3'9'U'j'''''''((4(6(((((((** +++%+3O3555566-606W6\6666666664777^7c777777777:8=8d8i888888888@9D9c9g999999:::,:/:6:;::::::;(;-;=;A;V;Y;`;e;f;p;;;;;$<)<9<=<R<U<\<a<b<l<<<"=+=P=V=t=v=======>>U>Z>u>y>>>>>>> ??A]cov<>KN^_x}$(IOko?D^bqw!'@EJP GK\ax| 5=Z]:= KQtxPUej  "49Z_di$)|qvx}27!X]V[).EFi $3EKOnq!&T_vy[]pu}23be~ $,3=@LQ`f &-cdnt TU^djkvz tx;=TXfh&,^bsy LP^bv|=AW[ou 69PR]a AE !'[_qv!$/2EHTYq|%)TW#BE5:juKMGJ|+/lr(*=C;@+/@DgkAEQWw{#r u   +    /(James Kevin Standiford#C:\WINDOWS\Desktop\ChapterThree.docJames Kevin Standiford#C:\WINDOWS\Desktop\ChapterThree.docJames Kevin Standiford#C:\WINDOWS\Desktop\ChapterThree.docJames Kevin Standiford#C:\WINDOWS\Desktop\ChapterThree.docJames Kevin Standiford#C:\WINDOWS\Desktop\ChapterThree.docJames Kevin Standiford5C:\windows\TEMP\AutoRecovery save of ChapterThree.asdJames Kevin Standiford5C:\windows\TEMP\AutoRecovery save of ChapterThree.asdJames Kevin Standiford5C:\windows\TEMP\AutoRecovery save of ChapterThree.asd John FisherL\\NYALBSRV1\DATA\USERS\TT\JFISHER\My Documents\Standiford\AutoLISP\IG\IG.doc Delmar UserG\\DELMAR-ERAS\E\OPG\adp99\resources\olcs\standiford_2\standiford_ig.doc Xu MmeS"Ҳ%&ԲR)Ȉ 8755Ay#Fؚ`NaI4=uc?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>@ABCDEFHIJKLMNSRoot Entry F.j,8 _9UData ;1Table{WordDocument"SummaryInformation(?DocumentSummaryInformation8GCompObjjObjectPool _9 _9  FMicrosoft Word Document MSWordDocWord.Document.89q