• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

lisp to manage increase value automatic attributes

  • Thread starter Thread starter mazzetti68
  • Start date Start date

mazzetti68

Guest
Hello, everyone!
I have a dynamic block (for windows), with inside a "numf" attribute, which in practice refers to the number of the window.
to numerarle use the lisp of the famous leemac:smile:, numinc. the problem lies in the fact that I often add endings, which are ordered on the floor in a specific order, which also follows the numerical order, e.g.[1] [2] [3] [4] [5]inserting a new window, to the number [4][1] [2] [3] [4] [5]
---[4]-----↑
Now I have to manually rename all the attraves of the window number. . . [4]becomes[5], [5]becomes[6], to get the right order:[1] [2] [3] [4] [5] [6]I would need a lisp that asks me to select the blocks that I want to increase the "numf" attribute, and what (usually +1).
by applying this, in the previous example, once placed my new window block [4], select the dynamic blocks to increase the "numf" attribute of +1, since I entered only the 4, if I entered a fake block number 5, the increment was +2; and I send. now the value of the "numf" attribute of all selected blocks has increased by +1.

Does anyone know if there is such a lisp? Since numinc does not have this possibility :

thank you in advance and good afternoon! !
 
I think we can do this.
a lisp with that function I don't have it in my library, but changing this attachment, then it should work. View attachment Modifica valore attrbuti blocchi.lspthis lisp selects the blocks, and modifies the "numf" attribute inside them with a value you cheat. then if you load it in autocad and impose 4 as value, it will put you for all your windows selected number 4.

the modification to the lisp could be:
I select the blocks as from the lisp, insert the value of increment n (in place of the change number, as from example 4), to each selected block I apply the increment n to the numf attribute.

Unfortunately I do not know at high levels of lsp, I tried to put into practice these changes but without outcome, so more than so I can not help you:frown:. I hope someone can give a hand, which I too would be useful :smile:.

p.s. in the attached lisp I have already inserted numf as an attribute that the lisp goes to look for.
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top