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:
Place text where block (Multiple Block Selection)
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: Place text where block (Multiple Block Selection) (Read 2605 times)
0 Members and 2 Guests are viewing this topic.
sanju2323
Newt
Posts: 68
Place text where block (Multiple Block Selection)
«
on:
August 17, 2015, 04:06:04 AM »
Place text at block. I need lisp two type first layer wise and second block name wise place.
«
Last Edit: August 17, 2015, 11:07:57 AM by sanju2323
»
Logged
ChrisCarlson
Guest
Re: Place text where block (Multiple Block Selection)
«
Reply #1 on:
August 17, 2015, 10:42:39 AM »
Huh?
Logged
sanju2323
Newt
Posts: 68
Re: Place text where block (Multiple Block Selection)
«
Reply #2 on:
August 17, 2015, 11:02:54 AM »
ChrisCarlson,
I don't understand what are you saying.
Logged
ronjonp
Needs a day job
Posts: 7529
Re: Place text where block (Multiple Block Selection)
«
Reply #3 on:
August 17, 2015, 11:07:20 AM »
Quote from: sanju2323 on August 17, 2015, 11:02:54 AM
ChrisCarlson,
I don't understand what are you saying.
You need a better example drawing of the results you are looking for. Chris is saying he does not understand your question & I don't either.
Logged
Windows 11 x64 - AutoCAD /C3D 2023
Custom Build PC
sanju2323
Newt
Posts: 68
Re: Place text where block (Multiple Block Selection)
«
Reply #4 on:
August 17, 2015, 11:37:58 AM »
Please download sample2 file for a better understand.
Logged
ChrisCarlson
Guest
Re: Place text where block (Multiple Block Selection)
«
Reply #5 on:
August 17, 2015, 11:51:44 AM »
For block name, why not just edit the block and insert the name of the block as a text entity?
Logged
sanju2323
Newt
Posts: 68
Re: Place text where block (Multiple Block Selection)
«
Reply #6 on:
August 17, 2015, 12:04:16 PM »
Sir, at this time the block name changes one by one to a long time procedure. I think lisp I would live to save my time.
Logged
ChrisCarlson
Guest
Re: Place text where block (Multiple Block Selection)
«
Reply #7 on:
August 17, 2015, 12:08:13 PM »
I can't write it at this time but look into the following
Code - Auto/Visual Lisp:
[Select]
(
setq
obj
(
vlax
-
ename
->
vla-object
(
car
(
entsel
)
)
)
layer
(
vla-get-layer
obj
)
point
(
vlax-get
obj 'InsertionPoint
)
)
and create a text entity from those variables.
Logged
ronjonp
Needs a day job
Posts: 7529
Re: Place text where block (Multiple Block Selection)
«
Reply #8 on:
August 17, 2015, 12:24:20 PM »
Here you go:
Code - Auto/Visual Lisp:
[Select]
(
defun
c:foo
(
/
_txt e n p ss
)
(
defun
_txt
(
p l s
)
(
entmakex
(
list
'
(
0
.
"TEXT"
)
'
(
100
.
"AcDbEntity"
)
'
(
67
.
0
)
(
cons
8
l
)
'
(
100
.
"AcDbText"
)
(
cons
10
p
)
'
(
40
.
2.0
)
(
cons
1
s
)
'
(
50
.
0.0
)
'
(
41
.
1.0
)
'
(
51
.
0.0
)
'
(
71
.
0
)
'
(
72
.
1
)
(
cons
11
p
)
'
(
73
.
2
)
)
)
)
(
if
(
setq
ss
(
ssget
'
(
(
0
.
"insert"
)
)
)
)
(
repeat
(
setq
n
(
sslength
ss
)
)
(
setq
e
(
ssname
ss
(
setq
n
(
1-
n
)
)
)
)
(
setq
p
(
cdr
(
assoc
10
(
entget
e
)
)
)
)
(
_txt p
"_LayerLabel"
(
cdr
(
assoc
8
(
entget
e
)
)
)
)
(
_txt p
"_BlockNameLabel"
(
cdr
(
assoc
2
(
entget
e
)
)
)
)
)
)
(
princ
)
)
Logged
Windows 11 x64 - AutoCAD /C3D 2023
Custom Build PC
sanju2323
Newt
Posts: 68
Re: Place text where block (Multiple Block Selection)
«
Reply #9 on:
August 17, 2015, 12:28:36 PM »
Thanks both of you its work
Logged
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
Place text where block (Multiple Block Selection)