Executing ACAD commands from VB .NET

Executing ACAD commands from VB .NET

Anonymous
Not applicable
725 Views
5 Replies
Message 1 of 6

Executing ACAD commands from VB .NET

Anonymous
Not applicable
Not to be too long winded, but the following preamble may help anyone able to assisit:

What I know (on a scale of 1 = inexperienced to 5 = very experienced):

VB .NET - 4 - I've successfully converted a number VB6 projects to VB .NET (non-ACAD)
LISP - 5 - 'Been using it for 15+ years
ObjectARX - 3 - Had no probelm with small modules used in conjunction with my LISP apps.

What I need:

I am busy converting a mid sized LISP app to ObjectARX 2009 in the .NET managed environment. Much has progressed well and the program is a lot more elegant and refined than before. I am, however, and largely as a result of inexperience, having a oproblem with executing commands in the .NET managed classes. I am familiar with acedCommand & acedCmd in the pure Object ARX environment but after much trolling of discussion groups & the Internet I have been unable to find much help on how to achieve the same in VB .NET. In one thread Tony Tanzillo mentioned that there was a 'RunCommand' method in the editor class, but other than one mention of this (as a new method), I find no info regarding its use. I must also add that I have little experience using Reflection which I believe is the only way to use the RunCommand. BTW, the ObjectARX 2010 documentation does not menttion RunCommand at all.

The commands that I need to excecute are to insert a small drawing (WBLOCK), to draw PLINES and to insert small single lines of TEXT into a drawing.

Has anyone any suggestions or sample code that would help me?

Pse excuse any typos .
0 Likes
726 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
http://www.caddzone.com/CommandLine.cs

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

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


wrote in message news:6168500@discussion.autodesk.com...
Not to be too long winded, but the following preamble may help anyone able
to assisit: What I know (on a scale of 1 = inexperienced to 5 = very
experienced): VB .NET - 4 - I've successfully converted a number VB6
projects to VB .NET (non-ACAD) LISP - 5 - 'Been using it for 15+ years
ObjectARX - 3 - Had no probelm with small modules used in conjunction with
my LISP apps. What I need: I am busy converting a mid sized LISP app to
ObjectARX 2009 in the .NET managed environment. Much has progressed well and
the program is a lot more elegant and refined than before. I am, however,
and largely as a result of inexperience, having a oproblem with executing
commands in the .NET managed classes. I am familiar with acedCommand &
acedCmd in the pure Object ARX environment but after much trolling of
discussion groups & the Internet I have been unable to find much help on how
to achieve the same in VB .NET. In one thread Tony Tanzillo mentioned that
there was a 'RunCommand' method in the editor class, but other than one
mention of this (as a new method), I find no info regarding its use. I must
also add that I have little experience using Reflection which I believe is
the only way to use the RunCommand. BTW, the ObjectARX 2010 documentation
does not menttion RunCommand at all. The commands that I need to excecute
are to insert a small drawing (WBLOCK), to draw PLINES and to insert small
single lines of TEXT into a drawing. Has anyone any suggestions or sample
code that would help me? Pse excuse any typos .
0 Likes
Message 3 of 6

Anonymous
Not applicable
Thanks Tony

Any info on that RunCommand, or is it something in the UAO zone
0 Likes
Message 4 of 6

Anonymous
Not applicable
The code I referred you to is essentially the same as RunCommand.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


wrote in message news:6169570@discussion.autodesk.com...
Thanks Tony Any info on that RunCommand, or is it something in the UAO zone
0 Likes
Message 5 of 6

Anonymous
Not applicable
That code that U provided works AOK for me. As a matter of interest for future pusual do you know if that 'RunCommand' is still in the Object 2010 SDK? As mentioned in my initial query I could find no mention of it in the SDK's reference.

Once again thanks for the help.
0 Likes
Message 6 of 6

Anonymous
Not applicable
Sorry, haven't I checked that so I can't tell you.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000 through 2009

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm


wrote in message news:6170683@discussion.autodesk.com...
That code that U provided works AOK for me. As a matter of interest for
future pusual do you know if that 'RunCommand' is still in the Object 2010
SDK? As mentioned in my initial query I could find no mention of it in the
SDK's reference. Once again thanks for the help.
0 Likes