CAD Forum - Database of tips, tricks and utilities for AutoCAD, Inventor and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 15477
RSS channel - CAD tips RSS tips
RSS discussions

Discussion Discussion forum

 

HelpCAD discussion

 
CAD Forum - Homepage CAD discussion forum - ask any CAD-related questions here, share your CAD knowledge on AutoCAD, Inventor, Revit and other Autodesk software with your peers from all over the world. To start a new topic, choose an appropriate forum.

Please abide by the rules of this forum.

How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic ClosedLisp for creating rectangle make a chamfer and ext

 Post Reply Post Reply
Author
Bogart07 View Drop Down
Newbie
Newbie


Joined: 02.Dec.2015
Location: Netherlands
Using: Autocad 2013
Status: Offline
Points: 5
Direct Link To This Post Topic: Lisp for creating rectangle make a chamfer and ext
    Posted: 11.Feb.2016 at 15:35
Hi Guys,

I need help for my lisp. Can someone help me? I just want to create a LISP that will create a rectangle after that adding chamfer on two sides and extrude it. Thanks in advance guys!


Back to Top
John Connor View Drop Down
Senior Member
Senior Member


Joined: 01.Feb.2011
Location: United States
Using: AutoCAD 2018
Status: Offline
Points: 7175
Direct Link To This Post Posted: 11.Feb.2016 at 17:33
You might want to tell us how you are going to size the rectangle.

Is it a fixed size?

Or will two diagonal corners be picked on screen?

Or will the user be prompted to enter the size manually?

Will the height be fixed or will the user be prompted to enter the height?

What two sides will be chamfered and how will they be selected?

Will this all be done on the current layer or will a new layer have to be created first?
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>

Back to Top
Bogart07 View Drop Down
Newbie
Newbie


Joined: 02.Dec.2015
Location: Netherlands
Using: Autocad 2013
Status: Offline
Points: 5
Direct Link To This Post Posted: 12.Feb.2016 at 08:24
(defun c:qwe (/ p1 p2 p3 p4  d1)
 
(setq p1 (getpoint "\nEnter first corner of rectangle : "))
 
(setq p3 (getpoint "\nEnter Second corner of rectangle : "))

(setq chamfera (getdist "\nEnter Chamfer Distance : "))

(setq chamferb (getdist "\nEnter Chamfer Distance2 : "))
(setq p2 (list (car p1)(cadr p3)))

(setq p4 (list (car p3)(cadr p1)))
 
(command "pline"  p1 p2 p3 p4 "c")

(command "_.chamfer" chamfera chamferb)

)
 
(princ)



I'm trying to use this. this will create your rectangle. i'm a beginner in lisp that's why I'm trying to create my own. Thanks in advance for your help.

Back to Top
John Connor View Drop Down
Senior Member
Senior Member


Joined: 01.Feb.2011
Location: United States
Using: AutoCAD 2018
Status: Offline
Points: 7175
Direct Link To This Post Posted: 16.Feb.2016 at 11:20
Thank you for answering all my questions.
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>

Back to Top

Related CAD tips:


 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0,395 seconds.