Costinbos77 Posted February 6, 2013 Posted February 6, 2013 Hi there, I want to use vla-move and benefit from OSMODE properties. (defun c:Test () ; (entmake (list '(0 . "TEXT") '(10 0 0 0) (cons 40 1) (cons 41 1) (cons 50 0) '(11 0 0 0) (cons 1 "Text") ) ) ;_ end of entmake (setq vob (vlax-ename->vla-object (entlast)) p1 (vlax-3D-point '(0 0 0)) ) ;_ end of setq (while (and vob (progn (and (not (member (setq gr ([color=blue]grread[/color] T 15 0) vt (cadr gr) cd (car gr)) '(3 25)) ) (not (member vt '(13 32)) ) ) ; Enter , Spatiu ) ;_ end of prog cond ) ;_ end of and (if (and (member cd '(3 5)) vob) (progn (setq p2 (vlax-3D-point (cadr gr)) ) ([color=blue]vla-Move[/color] vob p1 p2) (setq p1 p2) )) ;_ end of if not ) ;_ end of wh ) ;_ end of defun It is possible? Thanks in advance. Quote
Lee Mac Posted February 6, 2013 Posted February 6, 2013 It is possible? The grread function will pause to detect user input and will return a list of data pertaining to the type of input received [e.g. a return of (3 (123.0 456.0 0.0)) indicates that the user has left-clicked the point (123.0 456.0 0.0)]. However, whilst pausing to detect input, all standard drawing aids are disabled (e.g. Object Snap, Polar Tracking, Orthomode etc.). Hence, when calling the grread function within a while loop, such drawing aids are continuously disabled within the loop. Orthomode can quite easily be imitated by manipulation of the cursor coordinates based on the X & Y values of the cursor position; however, the only way to achieve Object Snap functionality within a grread loop (that is, without resorting to ObjectARX as used by DynDraw by Alexander Rivilis), is to use the osnap AutoLISP function to continuously attempt to snap the cursor position using the active Object Snap modes, and display a grvecs/grdraw vector to imitate the Object Snap symbol on-screen. Here is one example of such an imitation, and here is another. Quote
Costinbos77 Posted February 6, 2013 Author Posted February 6, 2013 (edited) Thanks Lee. What we saw in the first example, is very interesting. I think will find there what I want and something more. Edited February 6, 2013 by Costinbos77 Quote
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.