Edit
Attach
Printable
topic end
<!-- * Set TOPICTITLE = <nop>CoCreate Modeling FAQ: DDE --> ---++!! CoCreate Modeling FAQ: DDE %TOC% <style type="text/css"> pre { background-color:#FFEECC; } </style> --- <a name="DdeToOsdm"></a> <a name="dde"></a> ---+++ %ENGLISH% How do I talk to <nop>CoCreate Modeling via DDE? <nop>CoCreate Modeling services DDE requests, and you can also send DDE requests from <nop>CoCreate Modeling via Integration Kit functionality. See the section "DDE Interface" in the Integration Kit documentation for details. DDE is a fairly old interprocess communication protocol. It is still used both in Windows applications and in the operating system, though. As an example, the [[http://www.angelfire.com/biz/rhaminisys/ddeapps.html#DDEShell][Windows shell uses DDE]] to notify running applications when a user double-clicks a file which is associated with the application. DDE uses messages which are sent to an application's message queue. The DDE protocol requires all DDE-enabled applications to continually process messages, or else DDE communication in the system will be blocked. While an DDE-enabled application is busy doing other things (parsing a file, processing a spreadsheet, or, in <nop>CoCreate Modeling's case, blending complex edges), it may not react to DDE messages for a while, and as a consequence, even DDE conversations with _other_ apps may block for some time. For this reason, use DDE sparingly, and only in circumstances where losing a message at least does not have catastrophic effects. That said, here is a simple example in VBA which shows how to open a conversation with <nop>CoCreate Modeling and have it execute a command. <pre> Sub dde() Dim nChannelNumber As Variant nChannelNumber = DDEInitiate("PESD", "GENERAL") DDEExecute nChannelNumber, "(CREATE_PART :name ""dde_test_part"" :owner ""/"")" DDETerminate nChannelNumber End Sub </pre> By the way, if you want to try out DDE communication from a shell window, check out the command-line tool =ddeclient.exe= which is [[http://www.opensource.apple.com/darwinsource/WWDC2004/emacs-56/emacs/nt/ddeclient.c][part of the Emacs distribution]]: <pre> $ echo '(CREATE_PART :name "dde_test_part" :owner "/")' | ddeclient PESD GENERAL </pre> -- Main.ClausBrod - 14 Jul 2005 --- <a name="OsdmToDde"></a> ---+++ %ENGLISH% How do I talk to other applications from <nop>CoCreate Modeling via DDE? The Integration Kit provides the following DDE functionality to talk to external applications which support DDE: * =sd-dde-initiate= * =sd-dde-execute= * =sd-dde-poke= * =sd-dde-request= * =sd-dde-close= * =sd-dde-request-timeout= * =sd-dde-execute-timeout= The exact commands to be sent via DDE differ from application to application. The [[http://www.angelfire.com/biz/rhaminisys/ddeinfo.html][DDE FAQ]] provides information on many such applications and is a good starting point for further search. A typical DDE session usually involves three steps: 1 Initialization 2 Communication phase 3 Teardown In phase 1, you contact the external application using =sd-dde-initiate=: <pre> (setf dde (oli:sd-dde-initiate "EXCEL" "System")) ;; connect to Excel </pre> In phase 2, you send commands using =sd-dde-execute= and inquire data from the external application using =sd-dde-request=. <pre> (oli:sd-dde-execute dde "[Select(\"r1c1:r2c2\")]")) ;; select range </pre> In phase 3, you close the session using =sd-dde-close=. <pre> (oli:sd-dde-close dde) </pre> -- Main.ClausBrod - 21 Jul 2005 --- ---+++ %ENGLISH% How do I talk to Excel using DDE? See the sample code at MacroHelloExcel. -- Main.ClausBrod - 11 Apr 2007 --- %COMMENT{type="below" nonotify="on"}%
to top
End of topic
Skip to action links
|
Back to top
Edit
|
Attach image or document
|
Printable version
|
Raw text
|
Refresh
|
More topic actions
Revisions: | r1.3 |
>
|
r1.2
|
>
|
r1.1
|
Total page history
|
Backlinks
You are here:
CoCreateModeling
>
FaqDde
r1.3 - 24 Jul 2009 - 19:39 -
ClausBrod
to top
CoCreateModeling
CoCreate Modeling
FAQ
Introduction
Hardware
Operating system
Memory management
File handling
Installation
Licensing
Graphics
App. knowhow
Lisp
Learning
Programming
Debugging
DDE
Compiler
Customization
Troubleshooting
Links
Code examples
Viewbench
News
Changes
Index
Search
Impressum
Home
Webs
Atari
Blog
Claus
CoCreateModeling
Klassentreffen
Main
Sandbox
Sommelier
TWiki
Xplm
My links
edit
TWiki
Welcome
TWiki Web TWiki Web Home Changes Topics Index Search
TWiki Webs Atari Blog Main
OneSpaceModeling
?
Sandbox TWiki TWiki Webs Atari Blog Main
OneSpaceModeling
?
Sandbox TWiki
Jump:
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback