Lesson access board for online drafting courses This is the Access Board for the Online Drafting Courses created by Tim Davis. Once your tuition is received for whichever drafting course you're taking, an account will be created for you on this board. These courses are only available to registered students.




Drafting Certification


Credential: Certificate

The purpose of our Drafting Certificate program is to provide more than basic Architectural and Mechanical Drafting Skills. Our students will receive the skills to create complete Residential Construction, Survey, and Mechanical / Machine drawings. Subjects include drafting practices, and CAD software. Students are taught by a professional General Draftsman who has over 39 years drafting experience.


Certification of Achievement

Course Links

Related Links

Author Topic: AutoCAD LSP files  (Read 1609 times)

November 03, 2015, 09:43:29 AM
Read 1609 times


  • Master Draftsman and Architectural Designer
  • *****
  • Information
  • Hero Member
  • Administrator
  • Posts: 1021
  • If it's worth learning, it's worth learning right.
    • View Profile
    • House Plan Cad File Archive
An AutoCAD LSP file is a small script or program that is loaded into AutoCAD that performs a multitude of tasks in one function.

For instance, below is the code for stair.lsp which automates drawing stairs in architectural drawings. When the following code is saved in a text file called "stair.lsp" and then loaded into the cad program by typing: (load "stair.lsp"), by typing STAIR after it has loaded, will create the treads and risers for a stairway by following the instructions at the command prompt:

1. Touch top Starting Point Of Staircase
2. Enter The Staircase Vertical Height
3. Enter The Horizontal Length Of One Tread

Code: [Select]
(defun C:STAIR ()
(SETQ A (GETPOINT "\n Touch top Starting Point Of Staircase: "))
(SETQ VER (GETDIST "\n Enter The Staircase Vertical Height: "))
(SETQ HOR (GETDISt "\n Enter The Horizontal Length Of One Tread: "))
(SETQ VER1 (/ VER 7.5))
(SETQ VER2 (fix VER1))
(SETQ VER3 (+ VER2 0.5))
(if (>= VER1 VER3)
(SETQ W (+ VER2 1.0))
(SETQ W1 (/ VER W))
(SETQ ANG1 (* pi (/ 270.0 180.0)))
(SETQ ANG2 (* pi (/ 0.0 180.0)))
(SETQ S 1)
(WHILE (<= S W)
(SETQ PT1 (polar (LIST X Y) ANG1 W1))
(SETQ PT2 (polar PT1 ANG2 HOR))
(command "LINE" (LIST X Y) PT1 PT2 "")
(SETQ X (+ X HOR))
(SETQ Y (- Y W1))
(SETQ S (+ 1 S)))
(command "ERASE" "L" "")

© [Tim Davis] [2018] All Rights Reserved
No part of this website or any of its contents may be reproduced, copied, modified or adapted in any way, shape, form, of fashion without the prior written consent of the author, unless otherwise indicated for stand-alone materials.

There are no comments for this topic. Do you want to be the first?

Powered by EzPortal
Student Roll: AmberF, JSproul, samsparks501, OliverW, QuentinB, RobinC, JeffreyJ, CollinV, JAntol, JorgeV, wedomore, ArthurP, KarenP, DonK, LindyW, KHaug, JLewis, LinZ, RussellT, Dom, BOrtiz, LukeL, BoreyN , ChayaW, Hosam, PhillipS, TroyB, Kelsey, Skribblez, Emma, almondbrad, Melanie Amiatu, Dentubale, AlfonzoT, DavidC, Vanik, SolidRock, JerryW, RaymondH, AMims, RyanR, PFigueiredo, ENosakhare, VHarris, AnstonR, ChristopherP, Anoop, TinyLittleWorkshop, ArturoR, StephenO, JenniferL, BrianK, RightHandTech, TimothyS, NLorette, JOswald, SLortz, Cloraine, AnstonR , Pongo, Emily, Elizabeth, RWarburton, d_gsmer.0036, WayneM, SravyaJ, bpierre, WKincaid, QAncrum, RBruno, JRice, HollyM, MaxG, cchirichello, AndyP, MGarcia, RHumphries, TBlakesleay, CarlD, mschumann5, KiameshaL, AHullinger, Petras, AMacLeod, PrajeshP, JDorvee, DHagblom, CSantos, KAspden, OwenO, J.C. Kavanagh, PDodson, MarkK, KMarchbanks, JMcMichael, DGaul, EQUAYE, Calvin, FrancisG, Moses, hejingyun, truckerman, ArtieW, RickN, ABOY760, RaulP, SKomarov, AMehta, Angel, WNash, CWilder, BrettC, TravisT, BrannonB, EdwardC, MWellborn, CBBC, AOdhr, KGeorge, DBlack, SHarris, MStearn, JNicholls, BJensen, EMurnion, TTravis, SolomonE, WilliamD, ProperlyPolished, ShirleyR, JAdkins, FrankB, Sutter62, JTaylor, AlbertE, SFischer, DOsterman, KUmukoro, SDRose, DHeinle, KEllis, IWalden, HCantos, DSchiaroli, Donna, JBrown, JPeachey, PBrunson, GUnger, HGregg, EDybdahl, CMendez, Lowbridge, Wallace, ronwenger, nmtaylor1, Andreas, findjk, Andrew, Benjamin, DonHyde, Chanelle, Matthew, McCauley, Rebecca, Oscar, Patrick, JAguirre, GAdams, SChandi, CHewitt, JFranklin, HotShot, Rascal, SimonK, HStruss, SSharma, LeslieH, Spanks, EBarak, JNguyen, SLambert, Drooplefan, WHastedt, LWeston, DMorgan, PAmorello, KathleenN, CPadier, TMital, Ibrahim, putterer, JoelC, Godwin Osagie, THood, MAckler, JSullivan, MHanson, YSherman, MSprinks, BMaher, RHolk, Lewdy1, BNoffke