.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Supress command line echo

7 REPLIES 7
Reply
Message 1 of 8
Anonymous
2624 Views, 7 Replies

Supress command line echo

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)

7 REPLIES 7
Message 2 of 8
cadMeUp
in reply to: Anonymous

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.

Message 3 of 8
Anonymous
in reply to: cadMeUp

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.

Message 4 of 8
cadMeUp
in reply to: Anonymous

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

Message 5 of 8
Anonymous
in reply to: cadMeUp

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

Message 6 of 8
Anonymous
in reply to: Anonymous

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.

 

Message 7 of 8
cadMeUp
in reply to: Anonymous

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.

Message 8 of 8
StephenPreston
in reply to: cadMeUp

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost