Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Login
Register
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
Multileader
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: Multileader (Read 1699 times)
0 Members and 1 Guest are viewing this topic.
Fabricio28
Swamp Rat
Posts: 670
Multileader
«
on:
October 24, 2014, 03:10:56 PM »
Hi all,
I'm looking for a lisp to increment numbers of the multileader.
e.g
prefix: BLS-
I wanna increment the multileader's numbers keeping the prefix.
BLS-1; BLS-2 so on...
Could you help me out, please?
Thank in advance
«
Last Edit: October 24, 2014, 03:33:27 PM by FABRICIO28
»
Logged
ronjonp
Needs a day job
Posts: 7528
Re: Multileader
«
Reply #1 on:
October 24, 2014, 03:41:02 PM »
Give this a whirl
Code - Auto/Visual Lisp:
[Select]
(
defun
c:number
(
/
_entsel e n o p
)
(
defun
_entsel
(
msg
/
picked return
)
(
setvar
"ErrNo"
0
)
(
while
(
not
(
cond
(
(
and
(
null
(
setq
picked
(
entsel
(
strcat
"
\n
"
msg
)
)
)
)
(
/=
52
(
getvar
'errno
)
)
)
(
prompt
"
\n
Nothing Picked..."
)
)
(
(
null
picked
)
t
)
(
(
setq
return picked
)
)
)
)
)
return
)
(
vl-load-com
)
(
if
(
and
(
setq
p
(
getstring
"
\n
Enter Prefix:"
)
)
(
setq
n
(
getint
"
\n
Enter Starting Number:"
)
)
)
(
while
(
setq
e
(
car
(
_entsel
"Pick item to number: "
)
)
)
(
setq
o
(
vlax
-
ename
->
vla-object
e
)
)
(
if
(
vlax-property-available-p
o 'textstring
)
(
progn
(
vla-put-textstring
o
(
strcat
p
(
itoa
n
)
)
)
(
setq
n
(
1+
n
)
)
)
)
)
)
(
princ
)
)
Logged
Windows 11 x64 - AutoCAD /C3D 2023
Custom Build PC
Fabricio28
Swamp Rat
Posts: 670
Re: Multileader
«
Reply #2 on:
October 24, 2014, 04:05:29 PM »
Just Amazing! ronjonb
I saved my life and my time!!!
Thank you very much.
Logged
ronjonp
Needs a day job
Posts: 7528
Re: Multileader
«
Reply #3 on:
October 24, 2014, 04:07:44 PM »
Glad to help
Logged
Windows 11 x64 - AutoCAD /C3D 2023
Custom Build PC
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
Multileader