Supress command line echo

Supress command line echo

Anonymous
Not applicable
3,747 Views
7 Replies
Message 1 of 8

Supress command line echo

Anonymous
Not applicable

In VB.net when I send a command to the command line, how can supress the command line echo?

Is there better ways of sending commands to acad?

 

acaddoc.SendCommand(

"-STYLE" & vbCr & "SCHNormal" & vbCr & "romans.shx" & vbCr & SCHNormalH + 2 & vbCr & ".8" & vbCr & "0" & vbCr & "No" & vbCr & "No" & vbCr & "No" & vbCr)

0 Likes
3,748 Views
7 Replies
Replies (7)
Message 2 of 8

cadMeUp
Collaborator
Collaborator

Check out the attached code file, gives a basic example of adding/setting the current text style and also how to set an application variable like 'CMDECHO'.

 

It's best to avoid using SendCommand if possible and use other methods.

0 Likes
Message 3 of 8

Anonymous
Not applicable

Thanks a lot for the answer but I am having trouble in vb expres 2010.

If I can't set those dims properly the sub won't work.  Is there an imports or something I am missing.

 

 

How do you draw a line or poly?  I also am having hard time finding samples that work or documentation on VB.

 

I agree that the send command is very slow.  Would like to find a way to speed that up.

0 Likes
Message 4 of 8

cadMeUp
Collaborator
Collaborator

Add these statements to the top of your code file:

Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.Geometry
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.EditorInput
Imports Autodesk.AutoCAD.GraphicsSystem

 

Hopefully you'll be able to compile from there...

See the attached file from a couple of samples of drawing a line and polyline.

Also attached are the Dotnet samples from the 2010 ObjectARX SDK.

 

Checkout Autodesk's site:

AutoDESK-AutoCAD Programming

0 Likes
Message 5 of 8

Anonymous
Not applicable

Thanks a lot for that .net sample  I think I found some problems.  Will have to look at this a little more.

0 Likes
Message 6 of 8

Anonymous
Not applicable

I can not call any of these functions from within my module, and while debugging, it passes over them like they don't exist (not sure why).  I was hoping to pass some varables to them so I can use the function for more than drawing one line.

PrivateFunction SetStyle(ByVal StyleName AsString, ByVal StyleFont AsString, ByVal StyleSize AsDouble, ByVal StyleWidth AsDouble) AsBoolean

 

From what I think I am seeing this code has to be compiled in a dll then can be called with an external, I think which can sendcommand to netload then post an address.  The problem with all this is no parameters can be passed to the dll from what I under stand.

 

I have a data object that has over 10,000 fields in it which rely on the way a schedule is written.  I would like better and faster methods to write lines and text on the screen, but this dll thing is not going to work for my needs that I can see, unless someone can provide a differant solution.

 

0 Likes
Message 7 of 8

cadMeUp
Collaborator
Collaborator

You should probably check out the NET Developer's Guide:

NET Guide

 

Not sure if you have a background using VB or C# for developing AutoCAD?

NET code for AutoCAD gets compiled into dll modules and then loaded and run within AutoCAD.

0 Likes
Message 8 of 8

StephenPreston
Alumni
Alumni

On the subject of suppressing command echoing - setting the CMDECHO and NOMUTT sysvars (and resetting them later) is another way to suppress commandline output.

 

And I agree that working through the Developers Guide andthe AutoCAD .NET training labs posted to www.autodesk.com/developautocad will help you a lot if you're new to AutoCAD .NET programming.

Cheers,

Stephen Preston
Autodesk Developer Network
0 Likes