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

insertion block with progressive numbering

  • Thread starter Thread starter snorky
  • Start date Start date

snorky

Guest
Hello everyone! I'm trying to document how to "ball" a design in a semi-automatic way (it's actually not just as a ball but it's the closest thing to him)
I have a dynamic block with an attribute that I have to place by hand (son Catalan borders but little matter...) and automatically to every new insertion I need to be able to increase the number (+1)
After some research, I found a "sympathetic" method.
Code:
^^c^c_insert;"namelock";\;;$m=$(getvar,"variable");"$m=$(+,1,$(getvar,"variable"));
of course in "nomeblocco" and in "variable" the names of the case must be inserted.... only that I created the block, created the variable (in the calculator)

but I can't make the command work! I can't understand what's wrong, insert the block with number 1 while setting the variable with number 99 and closing the command with *not valid*

Where am I wrong?

Thank you! ! !
 
instead of "variable" write "useri1.
useri1 is the name of a variable that you can increase. at first it is worth 0...
in your code, however, the variable is not saved with the new value and then be read... .

This code (which I have not tested but written on the fly) should do:
Code:
^^c^c_insert;"namelock";\;;(getvar"useri1");(setvar"useri1"(1+(getvar"useri1")))
inserts the block, asks point of insertion then to the request of the value of the attribute puts the value read from the var useri1. later it increases and saves it with setvar.

nb: you must have autocad and not autocad lt to use my education
 
Thank you! I will try the change as soon as I put myself in front of the pc in the morning!!! useri1 I thought it was the name of a variable created for the purpose (following a tutorial not in Italian) and so I had prepared a variable in the calculator under the name "num" but I wasn't sure it worked :d
Thank you! ! !
 
It works perfectly! you have been enlightened :d
do you know how to give a "repeat" command to insert the block so you don't have to always click on the command in the palette?
 
but you are phenomenal:d
If I told you what I need these aids... almost like I would make you a quote for the development of an addon for autocad :p
Thanks again!!!
 

Forum statistics

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

Members online

No members online now.
Back
Top