How to use SendCommand in R14 without AcadX

How to use SendCommand in R14 without AcadX

Anonymous
Not applicable
390 Views
4 Replies
Message 1 of 5

How to use SendCommand in R14 without AcadX

Anonymous
Not applicable
I work in R14 and I need to execute a command with SendCommand in VB.
When I am linking to Acad I write the command

' This isn't a copy of my code but is basicaly what I'm doing.

Set objAcad = GetObject(, "AutoCAD.Application")
Set objDocum = objAcad.ActiveDocument
objDocum.SendCommand "COPY" & vbcr

VB don't recognize the method SendCommand, how can I execute a command?
0 Likes
391 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
Dan,

There may be a better way, but the only way I know of is "SendKeys". Its in
the VB docs.

Gary
0 Likes
Message 3 of 5

Anonymous
Not applicable
Hi Dan,
You can also use AcadUnsupp.arx's EvalLispEpr() function to send commands to
the command line. Search the Customer Files NG for AcadUnsupp. It exposes
several properties and functions not included in the Acad R14 object
odel. - And best of all, it's free.

- Adam

"Dan Moya" wrote in message
news:[email protected]...
> I work in R14 and I need to execute a command with SendCommand in VB.
> When I am linking to Acad I write the command
>
> ' This isn't a copy of my code but is basicaly what I'm doing.
>
> Set objAcad = GetObject(, "AutoCAD.Application")
> Set objDocum = objAcad.ActiveDocument
> objDocum.SendCommand "COPY" & vbcr
>
> VB don't recognize the method SendCommand, how can I execute a command?
>
0 Likes
Message 4 of 5

Anonymous
Not applicable
The free premiere issue of Joe Sutphin's "Sources" ezine has an article
detailing how to craft a dependable replacement for R14's SendKeys method.
Here's the link to his site:
http://vbdesign.hypermart.net/sources/sources.htm

--
Attitudes are contagious. Is yours worth catching?
http://www.acadx.com

"Dan Moya" wrote in message
news:[email protected]...
> I work in R14 and I need to execute a command with SendCommand in VB.
> When I am linking to Acad I write the command
>
> ' This isn't a copy of my code but is basicaly what I'm doing.
>
> Set objAcad = GetObject(, "AutoCAD.Application")
> Set objDocum = objAcad.ActiveDocument
> objDocum.SendCommand "COPY" & vbcr
>
> VB don't recognize the method SendCommand, how can I execute a command?
>
0 Likes
Message 5 of 5

Anonymous
Not applicable
You can't use AcadX in R14 to begin with, but perhaps
you're confusing it with AcVbExt or AcadUnsupp.arx ?

You can use SendMessage(AcadHwnd, WM_COPYDATA, ...) to do it in
any release.

Dan Moya wrote:
>
> I work in R14 and I need to execute a command with SendCommand in VB.
> When I am linking to Acad I write the command
>
> ' This isn't a copy of my code but is basicaly what I'm doing.
>
> Set objAcad = GetObject(, "AutoCAD.Application")
> Set objDocum = objAcad.ActiveDocument
> objDocum.SendCommand "COPY" & vbcr
>
> VB don't recognize the method SendCommand, how can I execute a command?

--
/*********************************************************/
/* Tony Tanzillo Design Automation Consulting */
/* Programming & Customization for AutoCAD & Compatibles */
/* ----------------------------------------------------- */
/* [email protected] */
/* http://www.caddzone.com */
/*********************************************************/
0 Likes