Sid24 Posted Thursday at 03:26 PM Posted Thursday at 03:26 PM (edited) Hi good day ! Please help me revise this LISP. The lisp calculating the center of the blocks and use it as a basepoint. I want to revise which it will use the true basepoint on the blocks. hope anyone can get my point. thank you in advance have a great day ahead. (defun C:ROB (/ SS LL UR MPT) (vl-load-com) (if (setq SS (ssget ":L")) (foreach ent (vl-remove-if 'listp (mapcar 'cadr (ssnamex SS))) (setq obj (vlax-ename->vla-object ent)) (vla-getboundingbox obj 'minpt 'maxpt) (setq LL (vlax-safearray->list minpt) UR (vlax-safearray->list maxpt) MPT (mapcar '/ (mapcar '+ LL UR) '(2 2 2)) ) (vl-cmdf "_.Rotate" ent "" "_non" MPT pause) ) ) (princ) ) Edited Thursday at 05:20 PM by SLW210 Added Code Tags! Quote
SLW210 Posted Thursday at 05:21 PM Posted Thursday at 05:21 PM Please use code tags for your code. (<> in the editor toolbar) Quote
mhupp Posted Thursday at 11:26 PM Posted Thursday at 11:26 PM Might not work been out of the lisp game for a hot min. remember autocad need like 3dpoint or something. can just use the dxf directly. should work with BricsCAD. (defun C:ROB (/ SS base) (vl-load-com) (if (setq SS (ssget '((0 . "INSERT") (410 . "Model")))) (foreach ent (vl-remove-if 'listp (mapcar 'cadr (ssnamex SS))) (setq base (cdr (assoc 10 ent))) (command "_.Rotate" ent "" "_non" base pause) ) ) (princ) ) 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.