Frederick Posted October 27, 2022 Posted October 27, 2022 Hello guys, I wanna move block by editing properties: Position X, Position Y, Position Z and angle. And iam using vla function: (this should move block wich i selected to the point Point have format (0,0,0) (setq object (vlax-ename->vla-object (ssname ss 0))) ;selected block (vla-put-coordinates object (vlax-3d-point point));change coordinates of the block to 0,0,0 Any idea? Quote
Tharwat Posted October 28, 2022 Posted October 28, 2022 Here is an example for you to learn from although doing it with DXF is much simpler and faster. (defun c:test ( / s o ) (and (setq s (car (entsel "\nSelect block to move to 0,0,0 : "))) (or (= (cdr (assoc 0 (entget s))) "INSERT") (alert "Invalid object selected !") ) (setq o (vlax-ename->vla-object s)) (or (vla-put-insertionpoint o (vlax-3d-point '(0. 0. 0.))) (vla-put-rotation o (* pi 0.25)) ;; rotation angle = 45 Deg. ) ) (princ) ) (vl-load-com) 3 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.