sendcommand hide prompt

sendcommand hide prompt

Anonymous
Not applicable
1,608 Views
6 Replies
Message 1 of 7

sendcommand hide prompt

Anonymous
Not applicable
is there way to disable command and prompt echo during "sendcommand" session from vba?

most of app runs with vba methods, and command history and display is untouched.
but something is simply not implemented, and you need to use "sendcommand" inside app, and suddeenly, the cmd text window is full of entity selection prompts although there is no user interaction since all required entity selections are done with embedded lisp like:
Select objects: (handent "226")

it is not a big deal, but would be nice *not* to display anything while vba app is running

also, it will be nice to completely disable interactive user input while runing vba app, since all required responses are supplied through app
0 Likes
1,609 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable
sali00 wrote:
> is there way to disable command and prompt echo during "sendcommand" session from vba?
>
> most of app runs with vba methods, and command history and display is untouched.
> but something is simply not implemented, and you need to use "sendcommand" inside app, and suddeenly, the cmd text window is full of entity selection prompts although there is no user interaction since all required entity selections are done with embedded lisp like:
> Select objects: (handent "226")
>
> it is not a big deal, but would be nice *not* to display anything while vba app is running
>
> also, it will be nice to completely disable interactive user input while runing vba app, since all required responses are supplied through app

NOMUTT & CMDECHO (although that may be just for AutoLisp).

Dave F.
0 Likes
Message 3 of 7

Anonymous
Not applicable
you are right, these two settings hide all except sendcommand line. so no more prompts or messages, just the pure sendcommand text as sent to autocad is displayed on cmd line

it is little bit strage that there is no centralized window command, but each submodule has its own control of display mode onto text window?
0 Likes
Message 4 of 7

Anonymous
Not applicable
ha scritto nel messaggio news:[email protected]...
is there way to disable command and prompt echo during "sendcommand" session
from vba?

most of app runs with vba methods, and command history and display is
untouched.
but something is simply not implemented, and you need to use "sendcommand"
inside app, and suddeenly, the cmd text window is full of entity selection
prompts although there is no user interaction since all required entity
selections are done with embedded lisp like:
Select objects: (handent "226")

it is not a big deal, but would be nice *not* to display anything while vba
app is running

also, it will be nice to completely disable interactive user input while
runing vba app, since all required responses are supplied through app
0 Likes
Message 5 of 7

Anonymous
Not applicable
In these days I delighted me to look for
a valid solution to use the forms VBA with the Lisp, finding
the limited DCLs, don't allow for instance to use the multipagines thing,
what it makes the smaller and functional form.
Probably the best system is the use of the variable "USERS1" etc.

ThisDrawing.SetVariable "USERS1", TextBox1.Text

But when the form is very crowded? for which the data are many?
I have used the SendCommand, or

ThisDrawing.SendCommand "(setq pp " & TextBox1.Text & ") "
ThisDrawing.SendCommand "(setvar " & """NOMUTT""" & " 1)" & "(setq SpPiaNodi
" & SpPiaNodi & ") "
It returns
Command:(setvar "NOMUTT" 1)(setq SpPiaNodi 15) 15
it works but it is not elegant

very comfortable, but to the line of command the whole program is seen...
(setq pp etc),
how to hide this drawback?
To find a solution would open new interesting possibilities.
0 Likes
Message 6 of 7

Anonymous
Not applicable
You can create a lisp function to call instead of just sending a lisp
expression. Then that function can contain a line of code to overwrite the
call. Something like this:
(defun somefunction (value1 value2) ; args to suit
(princ "\r "); length to suit
(setq
pp value1
SpPiaNodi value2
)
; and whatever else
(princ)
)

Then from VBA:
ThisDrawing.SendCommand "(somefunction """ & TextBox1.Text & """ """ &
SpPiaNodi & """) "
where I'm assuming that SpPiaNodi is a string variable in your VBA.
The command line will then receive something like
(somefunction "Text1" "Text2")
and the (princ "\r ") line will blank it out. Just be sure to include
enough spaces in this line to cover whatever you might send.

Ken Krupa
Autodesk Authorized Developer
Krupa CADD Solutions
www.krupacadd.com


Carry wrote:
> In these days I delighted me to look for
> a valid solution to use the forms VBA with the Lisp, finding
> the limited DCLs, don't allow for instance to use the multipagines thing,
> what it makes the smaller and functional form.
> Probably the best system is the use of the variable "USERS1" etc.
>
> ThisDrawing.SetVariable "USERS1", TextBox1.Text
>
> But when the form is very crowded? for which the data are many?
> I have used the SendCommand, or
>
> ThisDrawing.SendCommand "(setq pp " & TextBox1.Text & ") "
> ThisDrawing.SendCommand "(setvar " & """NOMUTT""" & " 1)" & "(setq SpPiaNodi
> " & SpPiaNodi & ") "
> It returns
> Command:(setvar "NOMUTT" 1)(setq SpPiaNodi 15) 15
> it works but it is not elegant
>
> very comfortable, but to the line of command the whole program is seen...
> (setq pp etc),
> how to hide this drawback?
> To find a solution would open new interesting possibilities.
0 Likes
Message 7 of 7

Anonymous
Not applicable
thanks
I will make some tests
carry
0 Likes