Ahankhah Posted December 8, 2014 Posted December 8, 2014 Hi CADmates, I have drawings full of dimensions overlapping on each other. Should any one let me know how to get rid of this position via programming? I tried some coding to move text of dimensions, but no success on associative dimensions. ;| (MT:Move:DimensionText<-Ename (car (entsel)) nil 0 1 0) |; (defun MT:Move:DimensionText<-Ename (%ename% %absolute|relative% %x% %y% %z% / *entlist* *assoc11*) (setq *entlist* (entget %ename% '("*"))) (cond ((/= (cdr (assoc 0 *entlist*)) "DIMENSION") nil) (T (setq *assoc11* (cdr (assoc 11 *entlist*))); text position (setq *assoc11* (if %absolute|relative% (list %x% %y% %z%) (list (+ %x% (car *assoc11*)) (+ %y% (cadr *assoc11*)) (+ %z% (caddr *assoc11*))) ) ) (setq *entlist* (subst (cons 11 *assoc11*) (assoc 11 *entlist*) *entlist*)) (entmod *entlist*) ) ) ) I appreciate any help Quote
hanhphuc Posted December 9, 2014 Posted December 9, 2014 (edited) Hi CADmates, I have drawings full of dimensions overlapping on each other. Should any one let me know how to get rid of this position via programming? I tried some coding to move text of dimensions, but no success on associative dimensions. hi Ahabkhah my $0.02 maybe vla-method? (defun MT:Move:DimensionText<-Ename (%ename% [color="red"]%absolute|relative%[/color] pt / obj) (setq obj (vlax-ename->vla-object %ename% )) (if [color="red"]%absolute|relative%[/color] (vla-put-TextMovement obj 0) (vla-put-TextMovement obj 2); 1= with leader ) (vla-put-TextPosition obj (vlax-3d-point pt)) ) im not sure %absolute|relative% means? or (acdimenableupdate nil) ? so i just assume t= relocate text & dim , nil= just relocate text ? (MT:Move:DimensionText<-Ename (car(entsel)) [color="red"]t[/color] (getpoint)) my apology if it doesn't help Edited December 9, 2014 by hanhphuc Quote
Ahankhah Posted December 9, 2014 Author Posted December 9, 2014 hanhphuc, thank you very much. I appreciate your kind help. Quote
hanhphuc Posted December 9, 2014 Posted December 9, 2014 You're welcome Ahankhah , i'm pleased you solved. 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.