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)
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.
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.
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:
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.
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.