Jump to content

Recommended Posts

Posted

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

 

image.png.2d4e031212d561439e5de3e0aeeb19d4.pngimage.png.6a653c145fe6395d922259a233c70cb9.pngimage.png.94c171e9978833a656f7b16a4f5675dd.pngimage.png.fb060a7de0d1ac6621b6aacea709293b.png   

 

 

Posted
  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...

Posted

How are you making the dimensions?

 

I made new dimensions in your drawing and they all had small text boxes.

Posted
  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.

Posted

I think you will need a LISP to modify an entire drawing at once.

Posted (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 by BIGAL
Posted
  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

Posted

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. 

Posted

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.

 

image.png.49a23b2a4f165c915138fc80a6a44365.png

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...