Learn AutoCAD for free

Lesson 7 – Executing AutoCAD Commands through AutoLISP

Rather than have an entirely new set of drawing and editing commands, AutoLISP permits the user to tap all of AutoCAD's existing commands from within AutoLISP using the (command) function. Explanation: the (command) function (command [command_name] [argument...]) The first argument to the (command) function is always the command name. It is followed by the command’s options input in the same order they would be typed at the AutoCAD “Command:” prompt. AutoCAD commands and options are typed in as strings. DO NOT use Read More...

Lesson 6 – Assigning Values to Symbols

One of the most powerful features of AutoLISP is the ability to store a variable and then use it again later. In AutoLISP, these variables are called symbols, and they may be assigned a value using the (setq) function. Explanation: the (setq) function (setq symbol expression) The (setq) function must have two arguments, the symbol name and an expression assigned to the symbol name. Command: (setq A 12.0) A single (setq) command can set any number of variables. (setq symbol1 expression1 symbol2 expression2 symbol3 expression3 );end Read More...

Lesson 5 – AutoLISP Distinguishes among Several Data Types

The bulk of this class will concentrate on learning the functions of AutoLISP. But, each of these functions requires certain types of arguments for the AutoLISP expression to make sense. For example, a function that adds two numbers together would require that its arguments be numbers. We need to be able to distinguish among five different data types: integers, reals, strings, lists, and symbols. We will learn about additional data types when we discuss AutoCAD entities and selection sets in Read More...

Lesson 4 – Every List is Evaluated in the Same Specific Manner

AutoLISP assumes that a list is an expression that needs to be evaluated. The function must be the first element in a list and its arguments must immediately follow it. A generalized AutoLISP function would look this way: AutoLISP evaluates the expression depending on the function definition and the explicit arguments that are designated. Some functions have required arguments and some have both required and optional arguments. In this book we will designate optional arguments in brackets, [optional argument]. Read More...

Lesson 3 – AutoLISP Evaluates every Expression

The LISP part of AutoLISP stands for list processing, which describes what happens when you run a routine: AutoLISP processes lists or, as we say here, evaluates expressions. If you type in an AutoLISP expression at the Command line it will return the results of the processed list. Command: (+ 18 6) 24  Expressionresults Each AutoLISP expression is enclosed in parentheses. Expressions are made up of a function followed by arguments. The function is analogous to the “verb” or action Read More...

Lesson 2 – AutoCAD and AutoLISP are Two Separate Programs

Though AutoLISP is an inherent part of AutoCAD, it is in fact an entirely separate program with different executable files, its own set of commands and syntax. AutoLISP expressions, however, can be typed in directly at the AutoCAD Command: prompt, and hence there needs to be a means of differentiating AutoLISP expressions from AutoCAD expressions. To initiate an AutoLISP expression, it must begin with either an open parenthesis “(” or an exclamation point “!”. When AutoCAD sees an expression that Read More...

Lesson 1 – why AutoLISP?

Learning AutoLISP is radically different from learning AutoCAD. AutoLISP is a programming language with its own commands, its own structure, and its own syntax. However, with a knowledge of AutoLISP, AutoCAD operators can amplify their powers with AutoCAD. AutoLISP puts new tools at your fingertips: Mathematical calculations Creating variables to hold values Reading and changing AutoCAD system variables Creating reusable functions Accessing and changing entity properties Accessing drawing file properties Reading and writing ASCII files But why AutoLISP? Why not Read More...

Lesson28 – Backgrounds & Landscapes

Use Background to set the background of your rendered image. you can use a Solid color or a Gradient of varying colors or use a bitmap Image file (e.g. cloud.tga) to make your renderings appear more realistic (e.g. the sky for a 3D house) or select Merge to use the current AutoCAD display as the background for the rendering. Fog lets you gradually mask objects that are further away & you can control where the fog begins and ends. you Read More...

Lesson27 – Assigning Materials In Models

Objects in the real world appear the way they do because of their surface material properties. you must understand how to work with materials to make your AutoCAD renderings appear more realistic and you must check Apply Materials when you Render to see the effects of materials assigned to surfaces in your model. Default Material Surfaces do not have material definitions assigned to them in new drawings created from scratch. surfaces are rendered using the default global material if there is Read More...

Lesson26 – Creating Lights & Defining Scenes

Use the Light command to create & edit the 4 light source types that include point, spot, distant & ambient lights. Light Blocks AutoCAD inserts a block at light locations to store lighting parameters as block attributes when you create new lights. the block is inserted on the current layer & attributes are on the ASHADE layer (which is automatically generated if required). there is no block required for ambient lighting as there is only one ambient light source. The ASHADE layer Read More...

Lesson25 – Saving Named Views To Render.

You can Render the current view but composing that view every time you want to create a rendering can be time consuming. you will probably want to use 3dorbit to compose & optimize a view for the active viewport. you may also want to change the projection to perspective for more realistic images. the right-click shortcut menu (when 3dorbit is running) is a convenient source of many tools to optimize your current view. When you are satisfied your view you Read More...

Lesson24 – Rendering Overview

Why Render? Your ability to effectively communicate design concepts to others can be an important skill in any industry. traditional 2D drawings contain design details for construction but many people do not have the required skills, time or desire to understand the design information presented in drawing formats. Full or reduced scale models and working prototypes are not as demanding for an audience to understand but they are also expensive and time consuming to make which cannot be justified in many Read More...

Lesson23 – Updating Changes To SOLIDs

SOLIDs and their generated 2D drawings (made with Soldraw & Solprof) are not associative drawings will not match modified SOLIDs unless you use Soldraw or Solprof again to update the drawing. PRACTICE UPDATING CHANGES TO SOLIDs » 1 Open the T305_8.dwg file in your personal folder. » 2) Left-click on the Model tab to switch to the model. 3) Select Solid in the Layer drop-down list on the Object Properties toolbar to make it the current layer. 4) Pick Format + Layer. Read More...

Lesson22 – Generating Isometric Views

When you use SOLID models to generate 2D drawings you can easily add an isometric view with hidden lines removed. this will make it easier to visualize your parts compared to drawings that include only orthographic views. You can create a viewport that shows the SOLID from an isometric viewing direction (e.g. SE Isometric) then set up the viewport so that it will always Plot with hidden lines automatically removed. select the viewport with no command running and right-click in Read More...

Lesson21 – Dimensioning The Layout

Create dimensions in the Model (you will see MODEL in the status bar) from the Layout tab. the UCS saved with each viewport is normally parallel to the view when you create drawings using default settings. you would have to use the View option of Ucs if for some reason the current UCS in the current viewport is not parallel to the view. if there is not enough room for dimensions you can use grip editing techniques to change Read More...

Lesson20 – Generating 2D Views With SOLDRAW

Once viewports have been properly set up you can use Soldraw to automatically create the drawing views for each viewport. you are prompted to select viewports created by Solview. you are automatically switched to paper space when you invoke Solview (if PAPER is not already displayed in the status bar). AutoCAD generates 2D geometry for each viewport and places these new objects in the MODEL on appropriate layers. you can change the special layer colors & linetypes (e.g. use HIDDEN Read More...

Lesson19 – Setting Up Viewports With SOLVIEW.

Your first task (before setting up viewports on a Layout) should be to set up the desired Layout for your 2D drawing using Pagesetup. you can refine the setup with Pagesetup later on but you should (at least) initially select the desired plot device & sheet size. If you have not already set up a layout you will invoke Pagesetup automatically by left-clicking on a layout tab you can also invoke Pagesetup in a shortcut by making a layout current, Read More...
Show Buttons
Hide Buttons
SUBSCRIBE TO OUR NEWSLETTER

It's FREE!

Sign up and receive an email every time a new tutorial is published