Michaels Posted October 17, 2010 Share Posted October 17, 2010 Hello , How is the proper way of using grdraw within this routine ? (if (and (setq p1 (getpoint "\n Specify point:")) [color="red"](grdraw p1 (setq p2 (getpoint "\n Specify point:")) 1 1)[/color] ) (entmakex (list (cons 0 "LINE") (cons 10 p1) (cons 11 p2) ) ) (princ) ) Many Thanks. Michaels Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted October 17, 2010 Share Posted October 17, 2010 No need for grdraw: (if (and (setq p1 (getpoint "\n Specify point:")) (setq p2 (getpoint "\n Specify point:" p1)) ) (entmakex (list (cons 0 "LINE") (cons 10 p1) (cons 11 p2))) (princ) ) Look up the getpoint function in the VLIDE help files. Quote Link to comment Share on other sites More sharing options...
Michaels Posted October 17, 2010 Author Share Posted October 17, 2010 Thanks Lee. I 've done that way first, but I just wanted to have something enjoyable with the routine with the use of (grdraw) function . Isn't it possible to have it with the routine ? Appreciated. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted October 17, 2010 Share Posted October 17, 2010 What do you mean? The extra argument for the getpoint function will give the same result (or better even) than grdraw. Quote Link to comment Share on other sites More sharing options...
CALCAD Posted October 17, 2010 Share Posted October 17, 2010 Michaels, Lee Mac is right. You don't need grdraw if all you want is to draw a line with entmake between p1 and p2. I am not sure what you want to do with grdraw, but I wish to point out that the 'and' function in your code will always return nil because the grdraw returns nil, so the entmake will never execute. Quote Link to comment Share on other sites More sharing options...
Michaels Posted October 17, 2010 Author Share Posted October 17, 2010 It's just about a matter of new looking of drafting lines while getting point. What you think about it.? Thanks Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted October 17, 2010 Share Posted October 17, 2010 Well you can use grread, but then you will lose OSnap, tracking, and just about everthing else - so IMO there is no point. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted October 17, 2010 Share Posted October 17, 2010 (defun c:WasteOfTime ( / p q g ) (if (and (setq p (getpoint "\nPick First Point: ")) (progn (princ "\nNow try to pick another without OSnap, Tracking, or any keyboard input...") (while (= 5 (car (setq g (grread 't 13 0)))) (redraw) (grdraw p (cadr g) 3 1) ) (listp (setq q (cadr g))) ) ) (entmakex (list (cons 0 "LINE") (cons 10 p) (cons 11 q))) ) (redraw) (princ) ) Quote Link to comment Share on other sites More sharing options...
Michaels Posted October 17, 2010 Author Share Posted October 17, 2010 Well you can use grread, but then you will lose OSnap, tracking, and just about everthing else - so IMO there is no point. No problem it's OK with me, grread would bring me to the other seashore which I prefer to keep on in the same line. Thanks a lot Lee. * Also Mr. CALCAD, you're right the routine hasn't completed due to the uncompletition of the function grdraw or otherwise the nil return of it . Many thanks for you all. Michaels Quote Link to comment Share on other sites More sharing options...
Michaels Posted October 17, 2010 Author Share Posted October 17, 2010 (defun c:WasteOfTime ( / p q g ) (if (and (setq p (getpoint "\nPick First Point: ")) (progn (princ "\nNow try to pick another without OSnap, Tracking, or any keyboard input...") (while (= 5 (car (setq g (grread 't 13 0)))) (redraw) (grdraw p (cadr g) 3 1) ) (listp (setq q (cadr g))) ) ) (entmakex (list (cons 0 "LINE") (cons 10 p) (cons 11 q))) ) (redraw) (princ) ) A very nice name of routine It does deserve it. Actually it is useless without tracking besides osnap grids on. Thank you for your hard work, and your precious time as well Lee. many thanks my friend. Michaels Quote Link to comment Share on other sites More sharing options...
alanjt Posted October 18, 2010 Share Posted October 18, 2010 Thanks Lee. I 've done that way first, but I just wanted to have something enjoyable with the routine with the use of (grdraw) function . Isn't it possible to have it with the routine ? Appreciated. it.blows my mind how much time people waste on flash. Quote Link to comment Share on other sites More sharing options...
Michaels Posted October 18, 2010 Author Share Posted October 18, 2010 it.blows my mind how much time people waste on flash. Me too, not that interested in flashs, but that was the first time I have thought of things like that. Thanks Alanjt Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.