SendStringToExecute method

SendStringToExecute method

Anonymous
Not applicable
2,465 Views
4 Replies
Message 1 of 5

SendStringToExecute method

Anonymous
Not applicable

In VB. Net sending commands directly to the AutoCAD command line by using SendStringToExecute method.
EchoCommand parameter set to False. Command sent not visible in the AutoCAD command line, but we can see it after clicking the right mouse. Is there any method to see .NET command as last one insteed the LISP one sent by .NET?

0 Likes
2,466 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable

go to options user perferences then click Right click customization and check settings

 

0 Likes
Message 3 of 5

Anonymous
Not applicable

No, and is why it's a bad idea to use SendStringToExecute()

to script AutoCAD commands, regardless of what you may

have read suggesting otherwise, on some Autodesk blog.

 

You can define a command using the CommandMethod

attribute, and add the CommandFlags.NoHistory flag to it.

From that method you can execute AutoCAD commands

synchronously using the code at the link below.

 

You can run your command with SendStringToExecute()

and AutoCAD will not repeat it when the user presses

enter, as long as it has the CommandFlags.NoHistory bit.

 

   http://www.caddzone.com/CommandLine.vb

   http://www.caddzone.com/CommandLine.cs

 

0 Likes
Message 4 of 5

Anonymous
Not applicable

Tony T.

I thought I read somewhere when the user clicks a button on custom ribbon you built to use the SendStringToExecute method

Do you suggest doing that?

0 Likes
Message 5 of 5

Anonymous
Not applicable

Sorry, I don't understand the question given the way it was put.

 

 

0 Likes