01-14-2008 09:22 AM
01-16-2008 06:01 AM
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
01-16-2008 11:32 AM