Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Varying tag

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
102 Views, 2 Replies

Varying tag

Hi;

Currently this lisp routine inserts a block with attribute.
Every time the same block is inserted, a dialog box
pops up showing tag as numeral one (1), and I change it
to a different number (sequentially increasing), and click
OK to show the block with new tag (i.e. 1, 2 ,3 etc).

Is there a way to (programmatically) increment the tag
and display it as a new tag in the block (block is a circle
with numbers inside) and then finish the insert command?

Thanks
mike
--
My email address has name of a fruit in
it. Please remove the fruit for email replies.
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

Mike, I use the following for inserting a room number block with the number
increasing by 1 for each block inserted. It only works while the command is
active. If you restart, you must input the value to begin with.

In my .mns file I have the following line:
(setq BNR (GETINT "Beginning Number: "));\MULTIPLE;RMNO;

In my .mnl file I have the following:
(defun c:RMNO ()
(setq a (itoa bnr))
(command "insert" "box" "s" f pause 0 a)
(setq bnr (+ 1 bnr)))

Notice that you must set the value of "bnr" before you start the
multiple;rmno; command. This allows the value to increase each time the
block is inserted. Hope this helps.

Nick

"m.a." wrote in message
news:E51E6B6CCDB570B4D9987824DC5319DC@in.WebX.maYIadrTaRb...
> Hi;
>
> Currently this lisp routine inserts a block with attribute.
> Every time the same block is inserted, a dialog box
> pops up showing tag as numeral one (1), and I change it
> to a different number (sequentially increasing), and click
> OK to show the block with new tag (i.e. 1, 2 ,3 etc).
>
> Is there a way to (programmatically) increment the tag
> and display it as a new tag in the block (block is a circle
> with numbers inside) and then finish the insert command?
>
> Thanks
> mike
> --
> My email address has name of a fruit in
> it. Please remove the fruit for email replies.
>
>
Message 3 of 3
Anonymous
in reply to: Anonymous

Thanks for your reply.
Actually, I have it working now.
It was easier than I thought it
would be.

mike
--
My email address has name of a fruit in it.
Please remove the fruit for email replies.


"Nick Pirkl" wrote in message
news:3D1268CE5068A04D75B95FCA6D9100CA@in.WebX.maYIadrTaRb...
> Mike, I use the following for inserting a room number block with the
number
> increasing by 1 for each block inserted. It only works while the command
is
> active. If you restart, you must input the value to begin with.
>
> In my .mns file I have the following line:
> (setq BNR (GETINT "Beginning Number: "));\MULTIPLE;RMNO;
>
> In my .mnl file I have the following:
> (defun c:RMNO ()
> (setq a (itoa bnr))
> (command "insert" "box" "s" f pause 0 a)
> (setq bnr (+ 1 bnr)))
>
> Notice that you must set the value of "bnr" before you start the
> multiple;rmno; command. This allows the value to increase each time the
> block is inserted. Hope this helps.
>
> Nick
>
> "m.a." wrote in message
> news:E51E6B6CCDB570B4D9987824DC5319DC@in.WebX.maYIadrTaRb...
> > Hi;
> >
> > Currently this lisp routine inserts a block with attribute.
> > Every time the same block is inserted, a dialog box
> > pops up showing tag as numeral one (1), and I change it
> > to a different number (sequentially increasing), and click
> > OK to show the block with new tag (i.e. 1, 2 ,3 etc).
> >
> > Is there a way to (programmatically) increment the tag
> > and display it as a new tag in the block (block is a circle
> > with numbers inside) and then finish the insert command?
> >
> > Thanks
> > mike
> > --
> > My email address has name of a fruit in
> > it. Please remove the fruit for email replies.
> >
> >
>
>

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost