PDA

View Full Version : LISP to reduce/raise an attribute figure


Zuke
2009-07-08, 04:59 AM
Hi guys & girls,

Does anyone have a LISP routin that can reduce/increase an attribute in a block by a given amount.

eg. I have a block that has an invert level in it (eg. 2.555 ) (its always a number with 3 decimal places), and can have its visibility altered to display a second attribute ( "2.555" "@ 1:60" ). what im looking for is a lisp that will reduce/increase the first number value by a requested amount. I need to be able to do a window selection to change multipul blocks through out the dwg regardless of the visibility state the number is always the first attribute if it helps.

1. runlisp
2. What is the Reduction/Increase: (positive or negitive numbers)
3. Select multipul blocks: (window select or shift select)
4. Complete

Have Fun
Zuke

irneb
2009-07-08, 06:34 AM
Try one of the solutions in these threads:

http://forums.augi.com/showthread.php?t=83231&highlight=attrib+increment
http://forums.augi.com/showthread.php?t=97069&highlight=increment

Zuke
2009-07-08, 11:39 PM
both of these posts don't really help. They are talking about editing individual attributes in sequence.

I just want to select a group of blocks and increase all numbers by a given number,
eg. block 1 has 2.555 in its contents and block 2 has 3.000. I want to add 10m to these numbers so i run the script, press 10, and select both blocks. The lisp routin then changes the values to 12.555 & 13.000 respectivly.

Any ideas?

irneb
2009-07-09, 06:59 AM
Maybe then this one: http://forums.augi.com/showthread.php?t=12866&highlight=add+attribute

However, that seems to only do it for integers. From your example you want to do it using reals instead. Will look at making something like this and revert back.

Zuke
2009-07-09, 11:28 PM
Thank you for your time.