Jump to content

Change Dimension Style Based On a Value


Nick24

Recommended Posts

Hi guys!

 

Please help me with a small issue.

 

I have a request to dimension this kind of objects. There are hundreds of files like this with one object per file. My issue occurs when dimensioning objects with huge differences between. Ones have 500-600mm, others can have 12000mm. Because having the same dimension text height everywhere, text will become extremely small comparing to the object length, thus becoming unclear. I want to avoid always change dimensions style and i'm wondering if there's a routine that can, in principle, search for string "TOTAL LENGTH:XXX" and then set dimension text height = length value / 40 (this is an acceptable factor for any length).

 

I already have the function with all the variables set, only the text/arrows height needs to be calculated based on object length as i stated above. 

 

(defun c:dsq()(command "dimclrt" "7" "" )(command "dimasz" "1" "" )(command "dimtxt" "1" "" )(command "dimclrd" "1" "" )(command "dimclre" "1" "" )(command "dimscale" "1" "" )(command "dimdec" "0" "" )(command "dimtvp" "0.7" "" )(command "dimtih" "OFF" "" )(command "dimtoh" "OFF" "" )(command "dimexo" "0" "" )(command "dimexe" "0.8" "" )(command "dimcen" "2" "" )(command "dimtofl" "ON" "" )(command "dimtfill" "0" "" )(princ))

 

image.thumb.png.75b98f8f03e367ccabc73d9851beb2fd.png

 

Thanks for any help!

 

Edited by Nick24
Link to comment
Share on other sites

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