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:
grread (mouse click event)
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: grread (mouse click event) (Read 2248 times)
0 Members and 1 Guest are viewing this topic.
ChrisCarlson
Guest
grread (mouse click event)
«
on:
August 03, 2015, 09:52:21 AM »
Code - Auto/Visual Lisp:
[Select]
(
while
(
equal
run
1
)
(
cond
(
(
equal
(
grread
nil
14
0
)
'
(
2
9
)
)
(
cond
(
(
equal
textdel
1
)
(
prompt
"
\n
Text Deletion Disabled
\n
Select Cell to edit: "
)
(
setq
textdel
0
)
)
(
(
equal
textdel
0
)
(
prompt
"
\n
Text Deletion Enabled
\n
Select Cell to edit: "
)
(
setq
textdel
1
)
)
)
)
(
(
equal
(
car
(
grread
t
4
0
)
)
5
)
(
setq
run
0
)
(
if
(
/=
(
setq
pt
(
vlax-3d-point
(
cadr
(
grread
t
4
0
)
)
)
)
nil
)
So I have a prompt which allows either [TAB] to be pressed or a valid mouse click. My issue is that currently the routine will not advance until the mouse is moved. Is there a better way to process the grread
Code - Auto/Visual Lisp:
[Select]
(
(
equal
(
car
(
grread
t
4
0
)
)
5
)
and also check that it is a valid 3d-point?
Logged
ribarm
Gator
Posts: 3297
Marko Ribar, architect
WWW
Re: grread (mouse click event)
«
Reply #1 on:
August 03, 2015, 10:35:09 AM »
What input do you want to make for routine to continue to work if it's not mouse movement? Then specify that option at the end of
cond
statement instead of (= (car (grread t)) 5)
Logged
Marko Ribar, d.i.a.
(graduated engineer of architecture)
M.R. on Youtube
ChrisCarlson
Guest
Re: grread (mouse click event)
«
Reply #2 on:
August 03, 2015, 10:40:43 AM »
Looking for on-click, the method I have now works only if the click is followed up by a mouse movement.
Logged
ChrisCarlson
Guest
Re: grread (mouse click event)
«
Reply #3 on:
August 03, 2015, 01:38:58 PM »
Thanks to,
http://www.cadtutor.net/forum/showthread.php?57304-Get-quot-alert-quot-when-pressing-a-key-in-a-while-loop-how&p=388898&viewfull=1#post388898
This seems to work
Code - Auto/Visual Lisp:
[Select]
(
setq
gr
(
grread
t
15
0
)
code
(
car
gr
)
data
(
cadr
gr
)
)
(
cond
(
(
and
(
equal
2
code
)
(
equal
9
data
)
)
(
cond
(
(
equal
textdel
1
)
(
prompt
"
\n
Text Deletion Disabled
\n
[TAB] to enable text delete
\n
Select Cell to edit: "
)
(
setq
textdel
0
)
)
(
(
equal
textdel
0
)
(
prompt
"
\n
Text Deletion Enabled
\n
[TAB] to disable text delete
\n
Select Cell to edit: "
)
(
setq
textdel
1
)
)
)
)
(
(
equal
3
code
)
(
setq
run
0
)
(
if
(
/=
(
setq
pick
(
vlax-3d-point
data
)
)
nil
)
«
Last Edit: August 07, 2015, 01:46:27 PM by ChrisCarlson
»
Logged
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
grread (mouse click event)