Jimmy Sean Posted May 5, 2010 Share Posted May 5, 2010 We use this lisp routine to change the attribute width in a block but since we have converted our block to being annotative it does not function correctly. When selecting a block the attribute gets really large and I’m not sure how to fix the routine so that the attribute does not get bigger in size. Would someone point me in the right direction? ; WIDEDIT.LSP c.2000 Rob Herr ; 'Edit Nested Attribute Width' v 1.0 17 Feb 2000 ; ; This routine lets you modify the width of and attribute in a block ; without exploding the attribute ; ; Pick one attribute. The current width is given and you are prompted ; for a new width. Works with Attributes also Attributes within blocks. ; ; ___________________________________________________________________ ; | PERMISSION HEREBY GRANTED BLA, BLA, BLA, TO MODIFY ETC. | ; | As long as name and email remain with the original program | ; | unaltered. However I would like to know of any bugs or problems | ; | that arise with the actual program. And of course I take no | ; | responsibility for lost limbs, auto repair bills, mechanical | ; | or electronic difficulties, or snake venom. | ; ------------------------------------------------------------------- (defun c:widedit (/ attent typ wd uwd) (setvar "CMDECHO" 0) (setq attent (entget (car (nentsel "\nSelect attribute: ")))) (setq typ (cdr (assoc 0 attent))) (if (cond ((= typ "ATTRIB")) ((= typ "T")) ) (progn (setq wd (rtos (cdr (assoc 41 attent)) 2)) (prompt (strcat "\nCurrent Width is <"wd"> ")) (setq uwd (getreal "\nEnter new width... ")) (setq attent (subst (cons 41 uwd) (assoc 41 attent) attent)) (entmod attent) (command "REGEN") ) (prompt "\nNo Attributes Selected") ) (setvar "CMDECHO" 1) (prompt "\nBy Rob Herr")(print) ) Thanks, Sean Quote Link to comment Share on other sites More sharing options...
alanjt Posted May 5, 2010 Share Posted May 5, 2010 It will be based on a percentage of the cannoscale or cannoscalevalue. eg. Instead of 1.6 for 20 scale (0.8 times scale), it would be 0.8 for 20 scale. In code, you could just divide the 1.6 by your scale to get the correct number. Quote Link to comment Share on other sites More sharing options...
Crank Posted May 5, 2010 Share Posted May 5, 2010 I think you've also made the attribute annotative. You must only make the block annotatative, not the attribute! If you have also made the attribute annotative it will scale twice (=quadratic): with the block and on it's own. Quote Link to comment Share on other sites More sharing options...
Jimmy Sean Posted May 7, 2010 Author Share Posted May 7, 2010 It will be based on a percentage of the cannoscale or cannoscalevalue. eg. Instead of 1.6 for 20 scale (0.8 times scale), it would be 0.8 for 20 scale. In code, you could just divide the 1.6 by your scale to get the correct number. Sorry I'm not following your example. Quote Link to comment Share on other sites More sharing options...
Jimmy Sean Posted May 7, 2010 Author Share Posted May 7, 2010 I think you've also made the attribute annotative. You must only make the block annotatative, not the attribute!If you have also made the attribute annotative it will scale twice (=quadratic): with the block and on it's own. I verified the block and the attributes are not annotative just the block is. Quote Link to comment Share on other sites More sharing options...
Jimmy Sean Posted May 7, 2010 Author Share Posted May 7, 2010 One thing I did notice is that if the anno scale is 1:1 it works correctly but if it is any other anno scale not so much. Quote Link to comment Share on other sites More sharing options...
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.