Jump to content

Recommended Posts

Posted

I detail all of my dwgs at full size and for a while now have been tring to create a routine that will take all of the dimensions in a selection and change them (with the correct numbers) to edited dimensions so that if i decide to mix scales i can keep the numbers i need instead of having to go through each one and manually change them before i scale my dwg. all of my attempts have been unfortunately horrible and do nothing close. so i decided to start over from scratch, deleted everything and would like someone to walk me through it. any ideas anyone?

Posted

No only model space

Posted

if you use paper space it will sovle your problem if i understand your post correctly.

 

in paper space you can have many viewports on one page and each can be a diffrent scale and the dimension text will be the same size for all. so the model space object will remain full scale

Posted

Well, if you still wanted to go ahead with the code, I would recommend firstly prompting for dimensions in the drawing, and also prompt for scale :)

 

Something like this to start you off:

 

(if (setq ss (ssget '((0 "DIMENSION"))))
 (progn
   (initget 6) ; Prevent zero or negative
   (getreal "\nSpecify Scale Factor: ")


etc...

Posted

Hey lee mac,

Sorry been a bit busy today but i understand prompting for dimensions but why scale?

Posted

oh wait.. no its not the text size its the contents once a dimension is edited it keeps its edited contents so thats the point, edit all dimensions then scale and the dimension text contents will not change

Posted

The scale factor used to scale the dimension value I thought :huh:

Posted

No the dimension is not being scaled only the object

it is confusing isnt it?

Posted
No the dimension is not being scaled only the object

it is confusing isnt it?

 

Sorry, so you want the Object Scaled, but the original dimension value to go into the Text Override, so that the value is displayed the same - am I correct?

Posted

That is exactly the purpose lee mac and sorry its taking so long for the reply, im being pushed with a deadline.

Posted

Something like this?

 

(defun c:dimscl  (/ scl ss)
 (vl-load-com)
 (if (and (setq scl (getreal "\nSpecify Scale Factor: "))
          (setq ss (ssget '((0 . "DIMENSION")))))
   (foreach x  (mapcar 'vlax-ename->vla-object
                 (vl-remove-if 'listp
                   (mapcar 'cadr (ssnamex ss))))
     (vla-put-TextOverride x
       (strcat
         (vla-get-TextPrefix x)
           (rtos
             (vla-get-Measurement x)
               (vla-get-UnitsFormat x)
                 (vla-get-PrimaryUnitsPrecision x))
         (vla-get-TextSuffix x)))
     (vla-ScaleEntity x
       (vla-get-ExtLine1Point x) scl))
   (princ "\n<< Nothing Selected >>"))
 (princ))
     

Posted
oh wait.. no its not the text size its the contents once a dimension is edited it keeps its edited contents so thats the point, edit all dimensions then scale and the dimension text contents will not change

 

Parametric Constraints, will alter the dimension contents as the object is changed in size or the object can be altered by changing the dimension.

 

Annotative text and dimensions will print out at the same size ( as you set) regardless of scale.

 

Scale for each print out should be done within layouts (paperspace) and each layout can contain several viewports, each at a different scale.

 

Sometimes it is hard to wrap ones head around all this stuff, so if this does not help clarify what you need post back, we are here to try & help. If I missed something someone will be sure to pipe up.

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