PDA

View Full Version : Making my Dimensioning routine repeat its command prompt


ReachAndre
2006-02-22, 04:54 PM
Hey everyone, I made a simple lisp for dimensioning. the lisp gives the impression of using baseline dimension and being able to manually place the text every time. The problem I'm having is that currently you have to right click in between each dimension.
So you get a pattern of:
left click to add dim
left click to place the dim and txt
right click left click to add dim
left click to place the dim and txt.....

I would like to be able just to left click once the command is picked.
I'm new at writing lisps but below is what I have in the lsp

(DEFUN C:SD () (COMMAND "dimlinear""0,0"))

Thanks for your help
Andre

T.Willey
2006-02-22, 05:17 PM
See if this works for you.

(defun c:FakeBaseline (/ Pt1 Pt2)

(if (setq Pt1 (getpoint "\n Select baseline origin point: "))
(while (setq Pt2 (getpoint Pt1 "\n Select second point for dimension: "))
(command "_.dimlinear" Pt1 Pt2 pause)
)
)
(princ)
)

ReachAndre
2006-02-23, 02:13 PM
Tim,
That works great. Thanks a bunch. You have a friend in Tampa, Fl if you're ever around, look me up.
Thanks again,
Andre

T.Willey
2006-02-23, 04:00 PM
You're welcome. I will try and remember that I have a friend in Tampa. :wink: