ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel

How to draw the a line and rectangle in autolisp

Updated on September 13, 2012

How to draw the line and rectangle in autolisp

How to draw the line and rectangle autolisp

Autolisp is used to write commands for the AUTOCAD. Let see how to draw the line in autolisp.

1.Type VLISP or VLIDE in command or

Goto TOOLS à AutoLISP à Visual lisp Editor

Ex: Command: vlisp

2. Then lisp editor is opened then write the code as below

(defun c:DrawLine()

(setq p1 (strcat “0” “,” “0”))

(setq p2(strcat “100” “,” “0”))

(command “line” p1 p2 “”)

)

3.Save the file as “drawline.lsp”

4.Open the autocad and type (load “drawline” ) at command:

5.Press ENTER

6.Type DrawLine

7. Then the line is created .

Autolisp is used to write commands for the autolisp. Let see how to the draw the line in autolisp.

1.Type VLISP or VLIDE in command or

Goto TOOLS à AutoLISP à Visual lisp Editor

Ex: Command: vlisp

2. Then lisp editor is opened then write the code as below

(defun c:DrawRectangle()

(setq p1 (strcat “0” “,” “0”))

(setq p2(strcat “100” “,” “100”))

(command “rectang” p1 p2 “”)

)

3.Save the file as “drawrect.lsp”

4.Open the autocad and type (load “drawrect” ) at command:

5.Press ENTER

6.Type DrawRectangle

7. Then the Rectangle is created .


For more information click on the below link

http://autolisp-roja.blogspot.in/2012/04/how-to-draw-line-in-autocad-using.html

http://autolisp-roja.blogspot.in/2012/07/how-to-get-angle-between-two-points-in.html

Comments

    0 of 8192 characters used
    Post Comment

    No comments yet.

    Click to Rate This Article