The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum
 Origin Forum
 DDE data import

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
OlegLgn Posted - 02/07/2002 : 09:38:44 AM
Can I import data directly (without writing LabTalk scripts) to the Origin 6.1 (not Origin Pro) worksheets from, for instance, LabView or other software, using DDE ?

I can do it with Excel, but it fails to work with Origin.
4   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 02/19/2002 : 11:01:24 AM
The OriginPro samples demonstrate using Origin as a DDE Server. Using Origin as a DDE Client does require some LabTalk programming except in a specific case.

Here is an example that retrieves data from Excel in blocks of 5 rows by 5 columns. Set up an Excel worksheet with 100 rows of 5 columns of data. The first column should be your increasing X values. Now run this script in Origin:

for(ready=0,attempts=0;ready==0&&attempts<10;attempts++) {
dde -c Excel|System idSys;
sec -p 1;
if(idSys>=0) ready=1;
}
if(attempts>=10) {
type -a Request timed out. Terminating...;
break1;
} else {
type -a Connected, retrieving info.;
}
dde -r idSys Topics;
dde -d idSys;
ii=1;
getn (Select a Topic:) ii:Z (Excel System Topics);
dde -c Excel|%[%Z,#ii] idXL;
wo -a 2;
set %H -e 100;
wo -s 0 0 0 0;
wo -p 201 scatter;
x2=100;y2=10;
currentrow=1;
blocksize=5;
reps=20;
delay=1;
repeat reps {
dde -rc idXL R$(currentrow)C1:R$(currentrow+blocksize-1)C26 Data1!R$(currentrow)C1:R$(currentrow+blocksize-1)C26;
currentrow+=blocksize;
sec -p delay;
};
dde -d idXL;
type Finished.;

The script first establishes that Excel is running, then offers the user a choice of DDE 'Topics' - select the worksheet you already setup. The data is brought into Origin in rows of 5 and plotted at one second intervals.

Here is an example that doesn't involve LabTalk scripting:

  1. Open an Excel workbook or worksheet file.
  2. Select a region in a sheet.
  3. Select Edit : Copy
  4. Go to Origin and click in the home cell of a worksheet (Row 1, Column 1).
  5. Select Edit : Paste Link

That's it. There is now a DDE link between the Excel region and the Origin worksheet (one-way, from Excel to Origin). If you make a change in the Excel worksheet, that change is sent to Origin via DDE.

Mike Buess Posted - 02/07/2002 : 3:44:12 PM
I doubt if you can get by without using a little LabTalk script. I have a very simple DDE communication between LabView and Origin. LabView saves its data to a file and then issues a DDE command to Origin telling it to run a macro and suppling the file name/path as an argument. It works quite smoothly, but the macro contains instructions for opening the file and handling the data afterwards. If you are interested I can elaborate.

Mike Buess
Origin WebRing Member
OlegLgn Posted - 02/07/2002 : 10:12:32 AM
quote:

OriginPro comes with a DDE demo and some VB and C++ source files. Look for them in the ATI subfolder. Hope that helps.

Mike Buess
Origin WebRing Member



I'm sure that can help. But not in my case. Unfortunately I have only Origin, not Origin Pro. How to be in this case ? And can I use NetDDE with Origin ?
Mike Buess Posted - 02/07/2002 : 10:05:41 AM
OriginPro comes with a DDE demo and some VB and C++ source files. Look for them in the ATI subfolder. Hope that helps.

Mike Buess
Origin WebRing Member

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000