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:
acrx_cmd_transparent, again !
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: acrx_cmd_transparent, again ! (Read 1247 times)
0 Members and 1 Guest are viewing this topic.
domenicomaria
Swamp Rat
Posts: 743
acrx_cmd_transparent, again !
«
on:
November 12, 2023, 07:13:54 AM »
Code - Auto/Visual Lisp:
[Select]
(
defun
:POINT2D
>
STRING
(
pt
)
(
strcat
(
rtos
(
nth
0
pt
)
2
12
)
","
(
rtos
(
nth
1
pt
)
2
12
)
)
)
(
defun
:ADD
-
TRANSPARENT
-
CMD
(
sym
-
func
-
name
/
str
-
func
-
name
)
(
setq
str
-
func
-
name
(
vl-symbol-name
sym
-
func
-
name
)
)
(
vlax-remove-cmd
str
-
func
-
name
)
(
vlax-add-cmd
str
-
func
-
name sym
-
func
-
name str
-
func
-
name acrx_cmd_transparent
)
)
(
defun
PR
(
/
ang dist ptr r
)
(
initget
"X"
)
(
setq
ptr
(
getpoint
"
\n
[eXit] reference point <lastpoint> :"
)
)
(
cond
(
(
not
ptr
)
(
setq
ptr
(
getvar
"lastpoint"
)
)
)
(
(
=
ptr
"X"
)
(
setq
ptr
nil
)
)
)
(
and
ptr
(
setq
ang
(
getorient
"
\n
direction <exit> : "
)
)
(
setq
dist
(
getdist
"
\n
distance <exit> : "
)
)
(
setq
r
(
polar
ptr ang dist
)
)
(
vla-SendCommand
(
vla-get-activedocument
(
vlax-get-acad-object
)
)
(
strcat
(
:POINT2D
>
STRING r
)
"
\n
"
)
)
)
)
(
:ADD
-
TRANSPARENT
-
CMD 'PR
)
This code
WORKS WELL
TRANSPARENTLY
in
ACAD COMMAND
and
LISP ROUTINES
...
but
only if I enter inputs from keyboard and not using the mouse
because
the mouse is locked while this code is running
!
For istance :
PLINE
... point ... point ...
'PR
(from this moment
the mouse is locked
)
but
it is possible to enter inputs using the keyboard
...
... and every thing goes normally ...
...
I want know why the mouse is locked while the code is running !
«
Last Edit: November 12, 2023, 07:19:08 AM by domenicomaria
»
Logged
domenicomaria
Swamp Rat
Posts: 743
Re: acrx_cmd_transparent, again !
«
Reply #1 on:
November 13, 2023, 09:59:05 AM »
a friend of mine tested the code in ACAD 2024,
and it works well!
So it depends from the version of ACAD !
I'm curious if there are any problems in BricsCAD ...
Logged
mhupp
Bull Frog
Posts: 250
Re: acrx_cmd_transparent, again !
«
Reply #2 on:
November 13, 2023, 12:21:08 PM »
i think you also need to tell it where to put the point. not just the active document but model space or paper space.
Code - Auto/Visual Lisp:
[Select]
(
setq
doc
(
vla-get-ActiveDocument
(
vlax-get-acad-object
)
)
)
(
setq
mspace
(
vla-get-ModelSpace
doc
)
)
(
vla-SendCommand
doc mspace
(
strcat
(
:POINT2D
>
STRING r
)
"
\n
"
)
)
Logged
domenicomaria
Swamp Rat
Posts: 743
Re: acrx_cmd_transparent, again !
«
Reply #3 on:
November 13, 2023, 01:10:51 PM »
@mhupp
ok ... but the main problem is the one I asked in my initial message ... to you, the mouse freezes or not?
When it asks the reference point,
is it possibile to enter a point
using the pointer ?
«
Last Edit: November 13, 2023, 01:13:54 PM by domenicomaria
»
Logged
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
acrx_cmd_transparent, again !