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.

Registered forum members do not see this ad.
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?
Code:; 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
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.
DropBox | finding the light...
Seann: ...it went crazy ex-girlfriend on me...
eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak...
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.



Registered forum members do not see this ad.
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.
Bookmarks