andy_lee Posted May 8, 2014 Share Posted May 8, 2014 Hi,guys I need a routine for Z axis to zero, Support all object, block ,attrib block ,dynamic block. Thanks for any help ! Quote Link to comment Share on other sites More sharing options...
ReMark Posted May 8, 2014 Share Posted May 8, 2014 Doesn't the FLATTEN command basically do that? Quote Link to comment Share on other sites More sharing options...
andy_lee Posted May 8, 2014 Author Share Posted May 8, 2014 Doesn't the FLATTEN command basically do that? NO,test it z0.dwg Quote Link to comment Share on other sites More sharing options...
andy_lee Posted May 8, 2014 Author Share Posted May 8, 2014 There is an easy one routine. but not support any block. ;;(HH:vlaZto0 (ssget)) (defun HH:vlaZto0 (ss / E N OBJ P1 P2) (defun MoveOne (e) (setq obj (vlax-ename->vla-object e)) (vla-move obj p1 p2) (vla-move obj p2 p1) ) (setq p1 (vlax-3d-point '(0 0 0))) (setq p2 (vlax-3d-point '(0 0 1000e99))) (cond ((equal (type ss) 'ENAME) (MoveOne ss)) ((equal (type ss) 'PICKSET) (repeat (setq n (sslength ss)) (MoveOne (ssname ss (setq n (1- n)))) ) ) ) ) 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.