DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

connecting vc++ application with diadem

HI,
I have an vc++ application which collects "crash test" data frm DAQ card. I am using diadem for first time & i don't know how to link with diadem i.e i need to send this data to diadem frm vc++ app & view thse data graphically thru diadem view frm vc++ dialog. I like to know do i need to use any other tools to communincate with diadem frm VC++?. Do help me?
0 Kudos
Message 1 of 7
(6,216 Views)
Hi,

You can bring your data into DIAdem using different methods, depending on what kind of connection you are looking for:

1. Direct connection using OLE. This will allow your VC++ application to directly write data into the DIAdem data area without using a file or data base for intermediate data storage.
2. File based connection. This connection can be used in different ways:

A. Your vc++ application writes an ASCII file with your data. DIAdem has an ASCII import wizard that allows you to simply import that ASCII file and the use the data within DIAdem.
B. Your vc++ application writes a binary file. You can add a DLL to DIAdem that contains a description of the data contained in this data file. By linking the DLL to DIAdem, you will be able to load the dat
a file just like a native DIAdem data file. To create the DLL, you can use the GPI (DIAdem programming interface) included with DIAdem.
C. Your vc++ can be programmed to write the DIAdem data file format. The DIAdem file format is described on the DIAdem program CD. It should not be too difficult to create that file format from your application.

Let me know if you have any additional questions,

Otmar
Otmar D. Foehner
Message 2 of 7
(6,216 Views)
HI,
Thanx for the reply!. I want to connect to diadem using OLE interface and also want to load Diadem graph image[.ldf] of my data in my dialog. Can you please give me sample application or the URL!!.

Thanx & regards
arun
0 Kudos
Message 3 of 7
(6,216 Views)
Hi Arun,

I don't have any example code for vc++. There is some example code for VB in DIAdem that is hopefully useful.

In DIAdem, press F1. When the help screen comes up, select the 'Index' Tab on the left side of the screen and enter 'Interfaces'. The help system will display several matches for this word, if you select 'OLE for applications', you should find some in depth information, expecially when you look at the "DIAdem.TODataSheet" information.

The DIAdem command to load a GRAPH layout in DIAdem is "PicLoad(PicFile)", the command to load a VIEW layout is "ViewLayoutLoad(ViewFile)". 'PicFile' and 'ViewFile' are the filenames of the layout you wish to load.

Check out the "DIAdem.TOCommand" which allows you to execute DIAdem commands from
other applications using an OLE connection.

Let me know if this will help you. If not, I can try and get my hands on some example C++ code and post it for you.

Best regards,

Otmar
Otmar D. Foehner
0 Kudos
Message 4 of 7
(6,216 Views)
Hi Otmar,
Thanx for your help abt connecting to diadem, i was able to connect to diadem via OLE-Dipatch interface[thanx to u] and also i was able to load an example file 'example' in diadem & also the graph, but I encountered two problems when i used below two diadem interface the code is:
a)pDispatch->TextVarGet("DatFile", vDatFile) which vb code in diadem says ' read the DIAdem var "DatFile" which is the name of the current data set'->is it necessary to do for me to load a Diadem graph of my data.{i got the bug as BAD_VARTYPE}
b) as you said i used "PicLoad(picfile)" to load the graph, below is code i used to get it into clipboard:
pDispatch->CmdExecuteSync("PicUpdate");
pDispatch->CmdExecuteSync("PicPrint('WinClip')");-to copy to clip bo
ard, but when i say = ::GetClipboardData(uFormat); in VC++ app i get NULL UFormat is NULL.
Do i need to call any other OLE interface for getting in clipboard data of the graph in my VC++.

Hope i am not bugging you?.
Thanx & regards
Arun
0 Kudos
Message 5 of 7
(6,216 Views)

hi, I want to use the feature Ole from Diadem, but I didn't' work to much with Diadem.

I want to control using Visual Basic, a controller and Diadem.

Using forms from a Excell File  I want to load the data from a controller in Diadem, and make a report, with the details that I want to send it via VB.

I find in the Help file of Diadem the script to connect to Diadem, but I don't know how to send the details of the test (test no., part no. sample no.) to the report and run the script (the one attached) to make the report.

 

0 Kudos
Message 6 of 7
(5,166 Views)

Hello Marse!

 

A good point to begin is to have look into the DIAdem help. Open the index page and look for 'ToCommand' (name of the DIAdem Standard OLE interface). To get an idea what to do to solve your problem try to make a script in DIAdem. You can also use the TeachIn function. If this script work you can start to send these commands via OLE and the CmdExecuteSync method instead.

 

BTW: It is always a good idea to start a new thread in this forum if your question not realy realys to an existing thread Smiley Wink

 

Hope this helps

 

Matthias

Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
0 Kudos
Message 7 of 7
(5,149 Views)