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:
Change Flipstate for Scale X -1
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: Change Flipstate for Scale X -1 (Read 1702 times)
0 Members and 1 Guest are viewing this topic.
lamarn
Swamp Rat
Posts: 636
Change Flipstate for Scale X -1
«
on:
October 04, 2019, 07:59:26 AM »
Hi all,
What i want to accomplish is a routine that changes my dynamic block to "Flipped" if Scale X is -1.
Thanks for any input or references..
Logged
Design is something you should do with both hands. My 2d hand , my 3d hand ..
Dlanor
Bull Frog
Posts: 263
Re: Change Flipstate for Scale X -1
«
Reply #1 on:
October 04, 2019, 09:08:31 AM »
Use Lee's dynamic block properties
http://www.lee-mac.com/dynamicblockfunctions.html
Logged
Dlanor
http://www.theswamp.org/donate.html
Lee Mac
Seagull
Posts: 12906
London, England
WWW
Re: Change Flipstate for Scale X -1
«
Reply #2 on:
October 04, 2019, 01:38:48 PM »
Quickly written -
Code - Auto/Visual Lisp:
[Select]
(
defun
c:test
(
/
f i o s
)
(
if
(
setq
s
(
ssget
"_:L"
'
(
(
0
.
"INSERT"
)
)
)
)
(
repeat
(
setq
i
(
sslength
s
)
)
(
setq
i
(
1-
i
)
o
(
vlax
-
ename
->
vla-object
(
ssname
s i
)
)
f
(
if
(
minusp
(
vla
-
get
-
xeffectivescalefactor o
)
)
1
0
)
)
(
foreach
p
(
vlax-invoke
o 'getdynamicblockproperties
)
(
if
(
equal
'
(
0
1
)
(
vlax-get
p 'allowedvalues
)
)
;; likely to be a flip parameter
(
vla
-
put
-
value p
(
vlax
-
make
-
variant
f
vlax-vbinteger
)
)
)
)
)
)
(
princ
)
)
Could be optimised to target specific blocks or a named dynamic flip parameter.
Logged
Lee Mac Programming
•
Twitter
•
Exchange App Store
lamarn
Swamp Rat
Posts: 636
Re: Change Flipstate for Scale X -1
«
Reply #3 on:
October 04, 2019, 06:06:15 PM »
That is amazing.
I can write some code but not like that.
Thanks!!
«
Last Edit: October 04, 2019, 06:11:41 PM by lamarn
»
Logged
Design is something you should do with both hands. My 2d hand , my 3d hand ..
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
Change Flipstate for Scale X -1