Author Topic: Add number to name of block if it is reinserted or copied  (Read 1854 times)

0 Members and 1 Guest are viewing this topic.

ELOQUINTET

  • Guest
Add number to name of block if it is reinserted or copied
« on: November 15, 2007, 02:31:32 PM »
Hey guys,

I'm trying to generate a schedule from attribute info but I need each of the blocks to have a unique name/number. What I need is something that would increment the block name if it is reinserted or copied. For instance I insert a block called "shade number 1" and if I copy it the copied block would get renamed to "shade number 2" and if another "shade number 1" was inserted it would be renamed to "shade number 3".
Has anyone written anything like this?

LE

  • Guest
Re: Add number to name of block if it is reinserted or copied
« Reply #1 on: November 15, 2007, 02:41:49 PM »
Sound that can be a nice homework using or implementing visual lisp object reactors... here @ theswamp, there are many samples about them posted.

but, you might get lucky and other member will provide with 'lisp a la carte' - that is a possibility....

ELOQUINTET

  • Guest
Re: Add number to name of block if it is reinserted or copied
« Reply #2 on: November 15, 2007, 03:07:58 PM »
I am testing out living legend

Living Legend

and it seems to be working but the only catch is that each block needs to have a different name

ELOQUINTET

  • Guest
Re: Add number to name of block if it is reinserted or copied
« Reply #3 on: November 15, 2007, 03:13:29 PM »
hmmm after i posted this i thought of a workaround which seems to be working. i created and item # attribute and specified this attribute as the column sort order

LE

  • Guest
Re: Add number to name of block if it is reinserted or copied
« Reply #4 on: November 15, 2007, 03:21:23 PM »
Dan;

Also, it will help others if you post an image sample of what you pretend to do.


btw, in one of posts here about LE lisp functions or something like that - there is a sample about generating a block counter table - not automatic but might help....

http://www.theswamp.org/index.php?topic=9441.msg122823#msg122823
« Last Edit: November 15, 2007, 03:28:04 PM by LE »

ELOQUINTET

  • Guest
Re: Add number to name of block if it is reinserted or copied
« Reply #5 on: November 15, 2007, 03:40:29 PM »
Yes I know I should give an example. I will try to put something together. The functions are interesting but I think I need to obtain mostly attribute info not a block count but the item number links the attribute info for each item together in the schedule.