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)
»
XDRX-API
»
Topic:
[XDrX-PlugIn(18)] Text,Mtext Convert to MLeader
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: [XDrX-PlugIn(18)] Text,Mtext Convert to MLeader (Read 962 times)
0 Members and 1 Guest are viewing this topic.
xdcad
Swamp Rat
Posts: 527
WWW
[XDrX-PlugIn(18)] Text,Mtext Convert to MLeader
«
on:
November 28, 2023, 08:13:57 AM »
Code - Auto/Visual Lisp:
[Select]
(
defun
c:tt
(
)
;|
Insertion point : the insertion point of the same text
Lead length : 3 times word height
Lead angle : 45 degrees
Horizontal length: 1 times the word height
Arrow size : (1/3) character height
|;
(
if
(
setq
ss
(
xdrx
-
ssget
"
\n
Select the Text to be converted,Mtext<Exit>:"
'
(
(
0
.
"*text"
)
)
)
)
(
progn
(
xdrx
-
begin
)
(
mapcar
'
(
lambda
(
x
)
(
xdrx
-
getpropertyvalue
x
"textstring"
"position"
"textheight"
"rotation"
)
(
setq
#length
(
*
#textheight
3.0
)
#rotation
(
+
#rotation
(
/
pi
4.0
)
)
doglen #textheight
arrowsize
(
/
#textheight
3.0
)
)
(
setq
mleader
(
xdrx
-
mleader
-
make
#position #rotation
#length #textstring
#textheight doglen
arrowsize
)
)
(
xdrx
-
entity
-
matchprop x mleader
)
(
xdrx
-
object
-
swapid x mleader
)
(
xdrx
-
entity
-
delete mleader
)
)
(
xdrx
-
pickset
->
ents ss
)
)
(
xdrx
-
end
)
)
)
(
princ
)
)
Logged
The code I wrote uses XDRX-API,which can be downloaded from github.com and is updated at any time.
===================================
https://github.com/xdcad
https://sourceforge.net/projects/xdrx-api-zip/
http://bbs.xdcad.net
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
XDRX-API
»
Topic:
[XDrX-PlugIn(18)] Text,Mtext Convert to MLeader