CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT - CZ | SK | EN | DE
Over 1.091.000 registered users (EN+CZ). AutoCAD tips, Inventor tips, Revit tips. Try the new precise Engineering calculator. New AutoCAD 2026 commands and variables.
RSS channel - CAD tips RSS tips
RSS discussions

Discussion Discussion forum

?
CAD discussions, advices, exchange of experience

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.
This is a peer-to-peer forum. The forum doesn't replace the official direct technical support provided by ARKANCE for its customers.
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 Program Help

 Post Reply Post Reply
Author
k8nadeau View Drop Down
Newbie
Newbie


Joined: 25.Feb.2009
Location: United States
Status: Offline
Points: 2
Direct Link To This Post Topic: Lisp Program Help
    Posted: 25.Feb.2009 at 20:53
I am trying to create a lisp program that will find the quarter point of a vertical line in order to draw a new line horizontally to represent welded wire fabric.

This is what I have. Everything works except the command line, which will not draw the line correctly.

(defun c:test()
(setq Pt1 (getpoint "\nSelect bottom point of line:"))
(setq X (car Pt1))
(setq Y1 (cadr Pt1))
(setq Pt2 (getpoint "\nSelect top point of line:"))
(setq Y2 (cadr Pt2))
(setq D (/(- Y2 Y1)4))
(setq DRL (+ D Y1))
(command "line" X DRL)
)

If anyone has any ideas, please don't hesitate. Thanks!


K8
Back to Top
Vladimir Michl View Drop Down
Moderator Group
Moderator Group

Arkance Systems CZ

Joined: 26.Jul.2007
Location: Czech Republic
Using: Autodesk software
Status: Offline
Points: 2098
Direct Link To This Post Posted: 25.Feb.2009 at 21:02
Not tested but the last line should read something like:
 
(command "_LINE" (list X DRL) ...here add the second point of the line...)
Vladimir Michl (moderator)
ARKANCE - https://arkance.world - Autodesk Platinum Partner
Back to Top
k8nadeau View Drop Down
Newbie
Newbie


Joined: 25.Feb.2009
Location: United States
Status: Offline
Points: 2
Direct Link To This Post Posted: 25.Feb.2009 at 21:11
That is closer to what I want Thanks! But it is now drawing the line from the bottom of the vertical line. How do I get it so that it reads the coordinates correctly and draws the line from the quarter point?
K8
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,088 seconds.