DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

DIAdem GPI: import groups in Data Portal

Hello,
 
I've developed a GPI-DLL to import my XML file, with the GPI extension toolkit (10.2).
 
So now, from my GPI, I can read the XML file (C++ function), but I don't know how to create a group in the data portal, (then the channel).
Which function can i use?
 
My configurationis DIAdem 10.2.0
 
Best regards,
 
Fred
 
 
0 Kudos
Message 1 of 3
(4,024 Views)

Hi,


The best way to import data in DIAdem is to develop a DataPlugin. Have you taken a look at the DataPlugins API? You should prefer the DataPlugin technique over the GPI file filter technique.


To your question: There is no GPI-API function for creating groups, but you can use the DIAdem ToCommand interface for doing this. The attached example DLL shows how.


Register the DLL within DIAdem and run the command “PropTest” in the module SCRIPT.

“PropTest” creates new root attributes (“RPInt16”, “RPInt32”, …) and groups (“G1”,  …)in the data portal.


Under the hood: The C++ function “PropTest“ in „PropTestCmd.CPP“ creates for example new groups with help of the class “CDIAdemLayer”. “CDIAdemLayer” instances the DIAdem ToCommand interface and provides a lot of methods for the handling of attributes and groups.


How does for example the method “RootPropertyCreate” work? It is really simple. DIAdem provides the script command “RootPropCreate“. Within “RootPropertyCreate” a string like “RootPropCreate("RPInt16", "DataTypeInt16")” will be assembled and with help of the ToCommand method “CmdExecuteSync” executed.


Thomas


0 Kudos
Message 2 of 3
(3,982 Views)
What do you mean by DataPlugin ? Just create a VBscript with a ReadStore(File) function (Is it possible with an C++ dll?)
 
We already have a vbscript to import our data. But we used large XML file, and vb is not appropriated for this (a lot of swap memory).
 
I'll try with your example.
 
Tks
 
 
0 Kudos
Message 3 of 3
(3,969 Views)