BLOACH85 Posted July 6, 2009 Posted July 6, 2009 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? Quote
JohnM Posted July 6, 2009 Posted July 6, 2009 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 Quote
Lee Mac Posted July 6, 2009 Posted July 6, 2009 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... Quote
BLOACH85 Posted July 7, 2009 Author Posted July 7, 2009 Hey lee mac, Sorry been a bit busy today but i understand prompting for dimensions but why scale? Quote
BLOACH85 Posted July 7, 2009 Author Posted July 7, 2009 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 Quote
Lee Mac Posted July 7, 2009 Posted July 7, 2009 The scale factor used to scale the dimension value I thought Quote
BLOACH85 Posted July 7, 2009 Author Posted July 7, 2009 No the dimension is not being scaled only the object it is confusing isnt it? Quote
Lee Mac Posted July 7, 2009 Posted July 7, 2009 No the dimension is not being scaled only the objectit 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? Quote
BLOACH85 Posted July 8, 2009 Author Posted July 8, 2009 That is exactly the purpose lee mac and sorry its taking so long for the reply, im being pushed with a deadline. Quote
Lee Mac Posted July 8, 2009 Posted July 8, 2009 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)) Quote
Rob-GB Posted July 8, 2009 Posted July 8, 2009 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. 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.