lamensterms Posted April 9, 2014 Posted April 9, 2014 Hey guys, Just wondering if I could please get some assistance conjuring up a SCALE routine which will warn the user if they are about to scale dimensions, and then explode any dimensions (if they are included in the selection set). I am currently working on a set of drawing which require a lot of enlarged details (details scaled at 2:1, 5:1, etc). The idea would be to draw and dimension the detail at 1:1, then scale up to whatever size required. The routine would provide an alert if any dimensions were selected in the SCALE selection set, and then explode any dimensions selected prior to scaling them up, so the dimension is no longer "live". Any direction would be greatly appreciated, or if anyone has any suggestions on a better solution for this situation? Thanks a lot for any help. Ps, we produce our 2D shop drawings in individual .DWGs, in model space. Due the the method we use to create our shop drawings (ProSteel) using viewports in layout space is, unfortunately, not an option. Quote
BIGAL Posted April 9, 2014 Posted April 9, 2014 Have you looked at annotative text used in your dim style this way no matter what scale it will always appear at a fixed text height. Quote
lamensterms Posted April 9, 2014 Author Posted April 9, 2014 (edited) Hey BigAl, Thanks for the reply. I'm not really fussed about the dimension text height at this stage - rather the value. Our current procedure is (for example): For a drawing at a scale of 1:1 (but a DIMSCALE factor of 10) - and to create an enlarged detail 2x the size on that same drawing (enlarged detail scale would be 2:1). Current DIMSCALE = 10. 1. Set DIMSCALE to 5 (also text height should reflect DIMSCALE). 2. Create and dimension detail as required. 3. Explode all dimensions associated with detail (so the values will not be altered when the detail is scaled up). 4. Scale detail and dimensions by scale factor of 2. 5. Reset DIMSCALE to drawings native scale - 10. The intention is to combinethe above steps 3 & 4 into the scale command. I hope that explanation was logical haha. Thanks again. Edited April 9, 2014 by lamensterms Quote
ReMark Posted April 9, 2014 Posted April 9, 2014 It is never a good idea to explode dimensions. Quote
SEANT Posted April 9, 2014 Posted April 9, 2014 If the preference is to keep the dimensions live (i.e., not exploded) then, perhaps, the dim’s LinearScaleFactor property could be set inverse to the detail scaling. Quote
lamensterms Posted April 9, 2014 Author Posted April 9, 2014 Hi guys, SEANT the LinearScaleFactor could be a good option. Would there be a way to get that value to adjust according to the scale, to main a constant dimension value? Quote
Dana W Posted April 9, 2014 Posted April 9, 2014 Hi guys, SEANT the LinearScaleFactor could be a good option. Would there be a way to get that value to adjust according to the scale, to main a constant dimension value? I am no math wizz but would it be LSF = SF * -1? Did I just prove I hate numbers? Quote
SEANT Posted April 9, 2014 Posted April 9, 2014 . . . . would it be LSF = SF * -1? . . . . Actually, it would be LSF = 1 / SF. Quote
SEANT Posted April 9, 2014 Posted April 9, 2014 The property in question is also available in the properties pallet. Quote
lamensterms Posted April 9, 2014 Author Posted April 9, 2014 Hi guys, yep that sounds pretty good, thanks for the suggestion. What would the code be to modify the LSF for any dimensions included in the SCALE selection set? Quote
Dana W Posted April 9, 2014 Posted April 9, 2014 Actually, it would be LSF = 1 / SF.OK, see. I haven't had math since I graduated high school in 1967. Quote
SEANT Posted April 10, 2014 Posted April 10, 2014 Hi guys, yep that sounds pretty good, thanks for the suggestion. What would the code be to modify the LSF for any dimensions included in the SCALE selection set? I'm not particularly fluent in Autolisp - perhaps this thread has some useful information. http://www.cadtutor.net/forum/showthread.php?53140-selec-dims-and-change-linear-dim-scale&highlight=LinearScaleFactor Quote
Dana W Posted April 10, 2014 Posted April 10, 2014 1967! Damn, that's way far back.Yup, it's in Wayback Machine territory. Quote
lamensterms Posted April 10, 2014 Author Posted April 10, 2014 Thanks for the link SEANT, I have had a look at that thread... The code shown there is a little too advanced for me. I think I can follow the math ok though. I need to set the LSF each time I scale, according to the current LSF and the new SF. What I'm struggling with at the moment though, is separating the dimensions from the scale selection set. So currently I can create a selection set for the SCALE command to operate on, but how can I create a second selection set of dimensions only, obtained from the SCALE selection set? Thanks again. Quote
Dadgad Posted April 10, 2014 Posted April 10, 2014 That sounds like it might be a good job for the FILTER command. Setting up the FILTERS takes a couple minutes, so consider saving them for future use, on the fly, with the SAVE AS option in the dialog box. Or maybe using LAYISO would be easier, and just select them. Quote
lamensterms Posted April 10, 2014 Author Posted April 10, 2014 Hi Dadgad, Thanks for the reply, I think I am making progress (slowly). I"ve got this code below: (defun c:nsc ( / ) (setq ss1nsc (ssget)) (if (setq ss2nsc (ssget "P" '((0 . "dimension")))) (PROGN (alert "Dims selected!") (command "explode" ss2nsc) (setq ss3nsc (ssget "P")) ) ) (command "scale" ss1nsc ss3nsc "" pause (setq sfnsc (getreal))) ) This code kinda works, experiementing with the possibility of exploding the dimensions - but it will only explode 1 dimension from the selection set. Any ideas on how to get the full DIMENSION selection set to get passed to the EXPLODE command? Quote
lamensterms Posted May 1, 2014 Author Posted May 1, 2014 (edited) Hey guys, So I've got the following code working OK. (defun c:psc ( / I L SS1NSC SS2NSC SS3NSC ) (setq ss1nsc (ssget)) (if (setq ss2nsc (ssget "P" '((0 . "dimension")))) (PROGN (repeat (setq i (sslength ss2nsc)) (setq l (cons (ssname ss2nsc (setq i (1- i))) l)) (command "explode" ss2nsc) (command "select" ss3nsc "P" "") (setq ss3nsc (ssget "P")) ) ) ) (command "scale" ss1nsc ss3nsc "" pause pause) ) I've used: (command "select" ss3nsc "P" "") (setq ss3nsc (ssget "P")) To add each exploded dimension to the selection set and it accumulates for every REPEAT. Happy to get some feed back on a more efficient way to get this done, but it does work for now. Looking forward to hearing back. Edited May 1, 2014 by lamensterms 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.