Macros and Scripts AutoCAD MCQs

By: Prof. Dr. Fazal Rehman | Last updated: September 24, 2024

What is the primary purpose of using macros in AutoCAD? A) To automate repetitive tasks B) To create 3D models C) To increase file size D) To slow down performance Correct Answer: A) To automate repetitive tasks Which command is used to record a new macro in AutoCAD? A) MACRO B) RECORD C) NEWMACRO D) SCRIPT Correct Answer: A) MACRO What file extension is commonly associated with AutoCAD script files? A) .LSP B) .SCR C) .DWT D) .DXF Correct Answer: B) .SCR Which command is used to run a script file in AutoCAD? A) RUN B) SCRIPT C) EXECUTE D) LOAD Correct Answer: B) SCRIPT How can you access the Macro Recorder in AutoCAD? A) Through the CUI command B) By typing RECORD in the command line C) By clicking on the Tools menu D) By using the SCRIPT command Correct Answer: B) By typing RECORD in the command line What does the term “script” refer to in the context of AutoCAD? A) A programming language B) A sequence of commands saved in a file C) A type of drawing D) A command used to edit blocks Correct Answer: B) A sequence of commands saved in a file Which of the following is a valid AutoCAD script command? A) LINE B) POLYGON C) CIRCLE D) ALL OF THE ABOVE Correct Answer: D) ALL OF THE ABOVE How can you edit an existing macro in AutoCAD? A) By using the EDIT command B) By using the CUI command C) By right-clicking the macro D) By using the MODIFY command Correct Answer: B) By using the CUI command What is the purpose of the “Playback” feature in AutoCAD? A) To execute a recorded macro B) To save drawing files C) To create new toolbars D) To edit drawing properties Correct Answer: A) To execute a recorded macro Which programming language is commonly used for writing custom AutoLISP macros? A) JavaScript B) Python C) AutoLISP D) C++ Correct Answer: C) AutoLISP What is the primary function of the command line in relation to macros? A) To store drawings B) To execute commands and macros C) To edit script files D) To manage layers Correct Answer: B) To execute commands and macros What is a common use for AutoLISP in AutoCAD? A) To create animations B) To automate drawing tasks C) To edit 3D models D) To manage file properties Correct Answer: B) To automate drawing tasks Which command can you use to load an AutoLISP file? A) LOAD B) APPLOAD C) LISP D) SCRIPT Correct Answer: B) APPLOAD What does the “AutoLISP” function (defun) allow users to do? A) Create a new drawing B) Define a new function or command C) Save changes to a drawing D) Load a script file Correct Answer: B) Define a new function or command How do you specify a command within a script file? A) By using the @ symbol B) By writing the command name directly C) By enclosing the command in brackets D) By using quotation marks Correct Answer: B) By writing the command name directly What happens when you execute a script file in AutoCAD? A) The drawing is saved automatically B) A sequence of commands is executed as if typed in the command line C) The AutoCAD interface is reset D) A new drawing file is created Correct Answer: B) A sequence of commands is executed as if typed in the command line What is the difference between a macro and a script in AutoCAD? A) Macros are recorded actions; scripts are text files of commands B) There is no difference C) Scripts can only run in batch mode; macros cannot D) Macros can only be created in LISP Correct Answer: A) Macros are recorded actions; scripts are text files of commands Which of the following would NOT typically be included in an AutoCAD script file? A) Command sequences B) Variable definitions C) Comments D) Drawing dimensions Correct Answer: D) Drawing dimensions How do you comment a line in an AutoCAD script file? A) By using the # symbol B) By using the // symbol C) By starting the line with a semicolon (;) D) By enclosing the comment in quotes Correct Answer: C) By starting the line with a semicolon (;) What command would you use to pause a script execution for a few seconds? A) WAIT B) PAUSE C) SLEEP D) DELAY Correct Answer: A) WAIT Which of the following can be automated using a macro? A) Inserting blocks B) Drawing lines C) Setting layer properties D) All of the above Correct Answer: D) All of the above What is the correct format for saving a macro in AutoCAD? A) .LSP B) .MAC C) .SCR D) .DWT Correct Answer: B) .MAC How can you test a macro after creating it? A) By using the TEST command B) By clicking the RUN button in the CUI dialog C) By typing the macro name in the command line D) By saving and reopening AutoCAD Correct Answer: C) By typing the macro name in the command line Which of the following is a feature of AutoCAD scripts? A) They can only be executed one at a time B) They can run in the background without user intervention C) They require advanced programming knowledge D) They can only work with 2D drawings Correct Answer: B) They can run in the background without user intervention What command is used to create a new script file in AutoCAD? A) NEW B) SCRIPT C) CREATESC D) There is no direct command for this Correct Answer: D) There is no direct command for this Which of the following is NOT a benefit of using macros in AutoCAD? A) Increased productivity B) Reduced errors in repetitive tasks C) Higher file sizes D) Improved efficiency Correct Answer: C) Higher file sizes How can you view the commands being recorded in a macro? A) By opening the macro file in a text editor B) By using the PLAYBACK command C) By reviewing the command history D) By displaying the command line Correct Answer: A) By opening the macro file in a text editor What does the “Append” command do in the context of a script file? A) It adds a new line to the end of a script file B) It runs the script file immediately C) It saves the current drawing D) It deletes the last command in a script file Correct Answer: A) It adds a new line to the end of a script file Which command can you use to stop a running script? A) ABORT B) EXIT C) STOP D) ESC Correct Answer: D) ESC What does a script file allow you to automate in AutoCAD? A) Creating blocks B) Executing a sequence of commands C) Modifying file properties D) Both A and B Correct Answer: D) Both A and B What does the “Defun” command do in AutoLISP? A) Deletes a function B) Defines a new function C) Executes a function D) Lists available functions Correct Answer: B) Defines a new function What is a potential downside of using scripts in AutoCAD? A) They are not customizable B) They can be difficult to debug if errors occur C) They cannot be executed multiple times D) They require complex programming knowledge Correct Answer: B) They can be difficult to debug if errors occur Which of the following can be included in an AutoLISP macro? A) Variables B) Conditional statements C) Loops D) All of the above Correct Answer: D) All of the above What does the “Command” function do in AutoLISP? A) It creates a new drawing B) It executes AutoCAD commands C) It saves the current drawing D) It lists available commands Correct Answer: B) It executes AutoCAD commands How do you execute a macro from the command line? A) By typing the macro name directly B) By using the EXECUTE command C) By right-clicking and selecting Run D) By clicking the Play button Correct Answer: A) By typing the macro name directly What is the maximum number of lines a script file can contain? A) 100 B) 1000 C) No limit D) 500 Correct Answer: C) No limit    
All Copyrights Reserved 2025 Reserved by T4Tutorials