0misclose Posted January 22 Posted January 22 I have a drawing with multiple rotated dimensions and some are quite small resulting in text being offset to the leader. I was wondering if there is an easy way to change all the text box components of the dimensions to fit the actual size of the text so that it isn't so offset from the leader without exploding all the dimensions. I've included some snap shots below for reference. There are quite a few in the file so I want to try and avoid having to do them manually one by one. Any help would be greatly appreciated. Regards, Ryan Quote
0misclose Posted January 22 Author Posted January 22 On 1/22/2025 at 4:25 AM, BIGAL said: Post a dwg need to see why its so far away. I've attached a dwg with a couple of sample dimensions. It looks like the text box of the text is quite a lot larger than the actual text and then the text is centred? When I reduce the size of the text box to suit the text it isn't offset. dim_test_file.dwgFetching info... Quote
SLW210 Posted January 22 Posted January 22 How are you making the dimensions? I made new dimensions in your drawing and they all had small text boxes. Quote
0misclose Posted January 23 Author Posted January 23 On 1/22/2025 at 11:45 AM, SLW210 said: How are you making the dimensions? I made new dimensions in your drawing and they all had small text boxes. The issue is I'm trying to utilise dimensions in a file that has been given to me (the file I have has 100s of dimensions). I want to avoid having to manually recreate all the small dimensions which have the offset text. I'm not sure why they are created with text boxes so large in the first place. Anyway, I appreciate everyone's input. Quote
SLW210 Posted January 23 Posted January 23 I think you will need a LISP to modify an entire drawing at once. Quote
BIGAL Posted January 25 Posted January 25 (edited) Ok no idea why it worked but if you copy the dim, the copied object resets the text. Very limited testing. (defun c:dimfix ( / oldsnap ss ent entl ins ss) (setq oldsnap (getvar 'osmode)) (setvar 'osmode 0) (setq ss (ssget '((0 . "dimension")))) (repeat (setq x (sslength ss)) (setq ent (ssname ss (setq x (1- x)))) (command "copy" ent "" "0.0,0.0,0.0" "10.0,0.0,0.0") (setq entl (entlast)) (command "erase" ent "") (command "move" entl "" "0.0,0.0,0.0" "-10.0,0.0,0.0") ) (princ) ) (c:dimfix) OOPS had copy instead of move back to original. Edited January 25 by BIGAL Quote
0misclose Posted January 25 Author Posted January 25 On 1/25/2025 at 1:35 AM, BIGAL said: Ok no idea why it worked but if you copy the dim, the copied object resets the text. Very limited testing. (defun c:dimfix ( / oldsnap ss ent entl ins ss) (setq oldsnap (getvar 'osmode)) (setvar 'osmode 0) (setq ss (ssget '((0 . "dimension")))) (repeat (setq x (sslength ss)) (setq ent (ssname ss (setq x (1- x)))) (command "copy" ent "" "0.0,0.0,0.0" "10.0,0.0,0.0") (setq entl (entlast)) (command "erase" ent "") (command "move" entl "" "0.0,0.0,0.0" "-10.0,0.0,0.0") ) (princ) ) (c:dimfix) OOPS had copy instead of move back to original. Expand No such luck on my end. Appreciate the help Bigal Quote
BIGAL Posted January 26 Posted January 26 I tested with Bricscad V25 so just something in the way that does the copy. I looked around for ages for the hidden code/property if you tick on text box can see the padding around the text. Quote
0misclose Posted January 27 Author Posted January 27 Does anyone know of a way to set the mtext width to 0 for all the rotated dimensions in one go? Because that seems to be what I need. 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.