Autolisp to Visual lisp: Design Solutions for Autocad instructor’s Guide Chapter One



Download 210.39 Kb.
Page6/8
Date05.05.2018
Size210.39 Kb.
#47999
1   2   3   4   5   6   7   8

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 doesn’t 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 box’s 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 box’s 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 tile’s 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 Checker

File Compiler

Source Code Debugger

Text File Editor

AutoLISP Formatter

Comprehensive inspection and watch tools

Context-Senitive Help

Program Manager

Object Oriented Programming Concepts

ActiveX functions

Reactors



4. VLIDE for Versions 14.01 and 2000

VLISP for version 2000 only
5.

Menus

Allows the developer to select Visual LISP commands

Toolbars

Allow the developer to select frequently used Visual LISP commands

Main Menu

Used to house the text editor, console window and debug window

Console Window

Designed to allow the developer to test and evaluate AutoLISP expressions

Trace Window

Designed to display the output of the trace function

Text Editor

A sophisticated programming tool integrated into a word-processing application specifically designed for the creation of AutoLISP programs.

Status Bar

Used 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 Style

Places 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 Style

Arranges 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 Style

Places 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 Style

Formats 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 window’s 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.

FAX

Compiled AutoLISP programs.

VLX

Standalone AutoCAD applications.

PRJ

Contains 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





Download 210.39 Kb.

Share with your friends:
1   2   3   4   5   6   7   8




The database is protected by copyright ©ininet.org 2024
send message

    Main page