TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Andrea on April 22, 2010, 11:51:49 AM
-
Hi all...
it's about a long time heun ? ;-)
sorry, I'm very busy..
Well, I would like to know if anyone have a clue for this.
(while (eq (car (setq input (grread t 4 4))) 5)
(setq vs (/ (getvar "Viewsize") 60.0))
(setq snappoint (osnap (cadr input) "_per"))
(redraw)
(if snappoint
(progn
(grdraw (polar snappoint 3.92699 vs) (polar snappoint 0.785398 vs) 2 0)
(grdraw (polar snappoint -0.785398 vs) (polar snappoint 2.35619 vs) 2 0)
)
)
)
any help will be appreciated.
Thanks.
-
Would this post help?
http://www.theswamp.org/index.php?topic=12813.msg157601#msg157601 (http://www.theswamp.org/index.php?topic=12813.msg157601#msg157601)
-
thanks Lee,
I've take a look and tested the code of Elpanov
.....but it seem to not working on 2011.
however, I've found some interesting snippet who maybe can help me for this issue....
;-)
thanks.
-
Not a problem - that code helped me incorporate OSnap into my programs that run on GrRead (its not perfect, but it is a pretty good substitute) - GrRead with OSnap is on my wishlist :-)
-
- GrRead with OSnap is on my wishlist :-)
It would definitely make them usable in a lot of situations.
-
I,ve create my own grread SNAPS.....the only problem is the perpedicular one..
i'll try to found a solution..
When it'll be done....I'll post here..
thanks.
-
the solution is "LASTPOINT"
(while (eq (car (setq input (grread t 4 4))) 5)
(setq vs (/ (getvar "Viewsize") 60.0))
(setq snappoint (osnap (cadr input) "_per"))
(redraw)
(if snappoint
(progn (grdraw (polar snappoint 3.92699 vs) (polar snappoint 0.785398 vs) 2 0)
(grdraw (polar snappoint -0.785398 vs) (polar snappoint 2.35619 vs) 2 0)
(entmake
(list (cons 0 "LINE") (cons 10 (getvar "LASTPOINT")) (cons 11 snappoint))
)
(setvar "LASTPOINT" snappoint)
)
)
)
-
the solution is "LASTPOINT"
(while (eq (car (setq input (grread t 4 4))) 5)
(setq vs (/ (getvar "Viewsize") 60.0))
(setq snappoint (osnap (cadr input) "_per"))
(redraw)
(if snappoint
(progn (grdraw (polar snappoint 3.92699 vs) (polar snappoint 0.785398 vs) 2 0)
(grdraw (polar snappoint -0.785398 vs) (polar snappoint 2.35619 vs) 2 0)
(entmake
(list (cons 0 "LINE") (cons 10 (getvar "LASTPOINT")) (cons 11 snappoint))
)
(setvar "LASTPOINT" snappoint)
)
)
)
Thanks vovka..
That.s what I've done..
but with some additional condition.
like if there is no first pick point..
Thanks again.