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:
Spltting Dimensions
« previous
next »
Print
Pages:
1
[
2
]
All
|
Go Down
Author
Topic: Spltting Dimensions (Read 3941 times)
0 Members and 1 Guest are viewing this topic.
ahsattarian
Newt
Posts: 113
Re: Spltting Dimensions
«
Reply #15 on:
November 07, 2023, 07:12:27 AM »
Have a look at this :
Code - Auto/Visual Lisp:
[Select]
(
defun
c:a
(
)
(
setq
fuzzy
0.01
)
(
defun
sub1
(
sj
)
(
setq
enj
(
entget
sj '
(
"*"
)
)
)
(
setq
po1
(
cdr
(
assoc
10
enj
)
)
)
(
setq
po2
(
cdr
(
assoc
11
enj
)
)
)
(
setq
po3
(
cdr
(
assoc
13
enj
)
)
)
(
setq
po4
(
cdr
(
assoc
14
enj
)
)
)
)
(
defun
sub2
(
)
(
cond
(
s1
(
entdel
s1
)
(
setq
s1
nil
)
(
entmod
en
)
)
)
(
sub1 s
)
)
(
defun
myortho
(
poj angj ptj
)
(
polar
poj angj
(
*
(
distance
poj ptj
)
(
cos
(
-
(
angle
poj ptj
)
angj
)
)
)
)
)
(
setq
s
(
car
(
entsel
"
\n
Select Dimension to Split or Continue : "
)
)
)
(
setq
en
(
entget
s '
(
"*"
)
)
)
(
setq
ang
(
cdr
(
assoc
50
en
)
)
)
(
defun
*error*
(
msg
)
(
sub2
)
)
;| #error |;
(
princ
"
\n
Pick New Dimension Point :
\n
"
)
(
setvar
"cursorsize"
1
)
(
setq
s1
nil
)
(
setq
txt
""
)
(
setq
g
1
)
(
while
(
=
g
1
)
(
setq
gr
(
grread
t
15
0
)
)
;| #grread |;
(
setq
code
(
car
gr
)
)
(
setq
po
(
cadr
gr
)
)
(
cond
(
(
=
code
5
)
;| Bedune Click |;
(
cond
(
s1
(
entdel
s1
)
(
setq
s1
nil
)
(
entmod
en
)
)
)
(
redraw
)
(
sub1 s
)
(
setq
po33
(
myortho po1 ang po3
)
)
(
setq
po44
(
myortho po1 ang po4
)
)
(
setq
dl
(
distance
po33 po44
)
)
(
setq
ponn
(
myortho po1 ang po
)
)
(
if
(
<
(
distance
ponn po33
)
(
distance
ponn po44
)
)
(
progn
(
setq
as1
13
)
(
setq
as2
14
)
(
setq
pot po3
)
(
setq
pott po33
)
)
(
progn
(
setq
as1
14
)
(
setq
as2
13
)
(
setq
pot po4
)
(
setq
pott po44
)
)
)
(
cond
(
(
/=
txt
""
)
(
setq
di
(
atof
txt
)
)
(
if
(
and
(
>=
di dl
)
(
not
(
equal
(
angle
ponn po33
)
(
angle
ponn po44
)
fuzzy
)
)
)
(
setq
ponn
(
polar
pott
(
angle
pott ponn
)
(
-
di
)
)
)
(
setq
ponn
(
polar
pott
(
angle
pott ponn
)
di
)
)
)
(
setq
po
(
myortho ponn
(
angle
pott pot
)
po
)
)
)
)
(
if
(
not
(
equal
(
angle
ponn po33
)
(
angle
ponn po44
)
fuzzy
)
)
(
entmod
(
subst
(
cons
as1 po
)
(
assoc
as1 en
)
en
)
)
)
(
setq
asli
(
list
-
1
2
5
102
310
300
330
331
340
350
360
410
)
)
(
setq
en1
(
vl
-
remove
-
if
'
(
lambda
(
a
)
(
member
(
car
a
)
asli
)
)
en
)
)
(
setq
s1
(
entmakex
(
subst
(
cons
as2 po
)
(
assoc
as2 en1
)
en1
)
)
)
(
sub1 s1
)
(
princ
(
strcat
"
\r
Dimension Distance = "
str
" : "
txt
)
)
)
(
(
=
code
3
)
(
setq
s s1
)
(
setq
s1
nil
)
(
setq
en
(
entget
s '
(
"*"
)
)
)
)
(
(
=
code
2
)
(
cond
(
(
member
po '
(
13
32
)
)
;| Enter Space |;
(
cond
(
(
=
txt
""
)
(
cond
(
s1
(
entdel
s1
)
(
setq
s1
nil
)
(
entmod
en
)
)
)
)
)
;;(setq s1 nil)
(
setq
g
0
)
)
(
(
=
po
8
)
(
setq
txt
(
substr
txt
1
(
1-
(
strlen
txt
)
)
)
)
(
princ
txt
)
)
;| #Backspace #substr |;
(
(
member
po '
(
43
45
46
48
49
50
51
52
53
54
55
56
57
)
)
(
setq
txt
(
strcat
txt
(
chr
po
)
)
)
)
;| + - . 0 1 2 3 4 5 6 7 8 9 |;
)
)
(
(
=
code
25
)
(
cond
(
s1
(
entdel
s1
)
(
setq
s1
nil
)
(
entmod
en
)
)
)
(
setq
g
0
)
)
;| #mouse #right-click |;
)
)
(
sub2
)
)
Logged
BIGAL
Swamp Rat
Posts: 1429
40 + years of using Autocad
Re: Spltting Dimensions
«
Reply #16 on:
November 07, 2023, 05:36:14 PM »
Just a comment for house type plans have drag a line over walls and it makes the dims. All wall lines auto dimmed, is that what your trying to do rather than pick points. Part of a house package so yes a fee.
«
Last Edit: November 07, 2023, 05:39:42 PM by BIGAL
»
Logged
A man who never made a mistake never made anything
ScottMC
Newt
Posts: 193
Re: Spltting Dimensions
«
Reply #17 on:
November 09, 2023, 10:45:26 AM »
Very nice and certainly adding to my library. Have not figured it out yet, but the (princ.. Dimension Distance) on line 60, causes it to quit, vlide highlighted it and runs fine without/commented. Thanks
Logged
Print
Pages:
1
[
2
]
All
|
Go Up
« previous
next »
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
Spltting Dimensions