Visual Basic v6 and DDE problem

Visual Basic v6 and DDE problem

isocam
Collaborator Collaborator
609 Views
7 Replies
Message 1 of 8

Visual Basic v6 and DDE problem

isocam
Collaborator
Collaborator
Can anybody help?

I have the following Visual Basic 6 code that I am using
to control AutoCAD LT from.

sExePath = "C:\Program Files\AutoCAD LT 2004\aclt.exe"
sAcadVersion = "AutoCAD LT"
Text1.LinkMode = 0
Text1.LinkTopic = "AutoCAD LT.DDE|system"
Text1.LinkMode = 2
Text1.LinkExecute OutputString & Chr(13)

My client wants to use a similar routine for both
AutoCAD 2002 and AutoCAD 2006, thus:-

sExePath = "C:\Program Files\AutoCAD 2006\acad.exe"
sAcadVersion = "AutoCAD"
Text1.LinkMode = 0
Text1.LinkTopic = "AutoCAD.DDE|system"
Text1.LinkMode = 2
Text1.LinkExecute OutputString & Chr(13)

Obviously...

I know that the paths change etc, but it still will not
work. Any assistance would be very grateful.

Many thanks in advance!

Darren
0 Likes
610 Views
7 Replies
Replies (7)
Message 2 of 8

Anonymous
Not applicable
Yow, it's been ages since I've used DDE to communicate with ACAD, but if I recall correctly the LinkTopic must match the version you're using. For 2006 try:

Text1.LinkTopic = "AutoCAD.R16.DDE|System"

Or it might even have to be:

Text1.LinkTopic = "AutoCAD.R16.2.DDE|System"

For 2002, try:

Text1.LinkTopic = "AutoCAD.R15.DDE|System"


If at all possible, you might want to update your code to get a reference to ACAD and use the object model's methods & properties, rather than continuing to depend on DDE.
0 Likes
Message 3 of 8

Anonymous
Not applicable
If at all possible, you might want to update your code to get a reference to
ACAD and use the object model's methods & properties, rather than continuing
to depend on DDE.

``````````````````````````````
this is not possible since LT does not expose an API.

bob

wrote in message news:5519467@discussion.autodesk.com...
Yow, it's been ages since I've used DDE to communicate with ACAD, but if I
recall correctly the LinkTopic must match the version you're using. For 2006
try:

Text1.LinkTopic = "AutoCAD.R16.DDE|System"

Or it might even have to be:

Text1.LinkTopic = "AutoCAD.R16.2.DDE|System"

For 2002, try:

Text1.LinkTopic = "AutoCAD.R15.DDE|System"


If at all possible, you might want to update your code to get a reference to
ACAD and use the object model's methods & properties, rather than continuing
to depend on DDE.
0 Likes
Message 4 of 8

Anonymous
Not applicable
Bob wrote:
>this is not possible since LT does not expose an API.

Note that the original poster was asking about moving the code to AutoCAD 2002 and 2006, not LT.
0 Likes
Message 5 of 8

Anonymous
Not applicable
Wrong.

"I have the following Visual Basic 6 code that I am using
to control AutoCAD LT from."

--
R. Robert Bell


wrote in message news:5520888@discussion.autodesk.com...
Bob wrote:
>this is not possible since LT does not expose an API.

Note that the original poster was asking about moving the code to AutoCAD
2002 and 2006, not LT.
0 Likes
Message 6 of 8

Anonymous
Not applicable
Oops, sorry. Just read the middle part of the OP. Yikes. I hate that.

--
R. Robert Bell
0 Likes
Message 7 of 8

Anonymous
Not applicable
Heh-heh, no problem, I've made the same mistake myself in the past. 🙂

That's why I didn't start off my reply to Bob with something like "y dont u learn 2 reid u #@$%...!!!!! " even though that attitude seems to be getting more and more popular in some forums these days. I know I'm not infallible, not even close, so I don't expect other folks to be perfect either. Geez, sounds like it's time for a group hug! 😉
0 Likes
Message 8 of 8

Anonymous
Not applicable
( | | | )

--
R. Robert Bell


wrote in message news:5521227@discussion.autodesk.com...
Heh-heh, no problem, I've made the same mistake myself in the past. 🙂

That's why I didn't start off my reply to Bob with something like "y dont u
learn 2 reid u #@$%...!!!!! " even though that attitude seems to be getting
more and more popular in some forums these days. I know I'm not infallible,
not even close, so I don't expect other folks to be perfect either. Geez,
sounds like it's time for a group hug! 😉
0 Likes