Page 1 of 1
DpTypeChange
Posted: Thu Nov 03, 2022 10:22 am
by boris_eli
Hello guys,
I am trying to change DP Type to Emebed DP-Type with script but without success,
when iam changing the type to DPEL_STRUCT its working
is there ant way i can make it possible ?
thanks alot !!
Re: DpTypeChange
Posted: Thu Nov 03, 2022 12:55 pm
by kilianvp
Here an example for ExampleDP_DDE. This change string1 to a type Ref for DRIVE1
Code: Select all
main(mapping event)
{
dyn_dyn_string dds;
dyn_dyn_int ddi;
dds[1] = makeDynString("ExampleDP_DDE");
dds[2] = makeDynString("", "f1");
dds[3] = makeDynString("", "f2");
dds[4] = makeDynString("", "b1");
dds[5] = makeDynString("", "string1", "DRIVE1");
ddi[1] = makeDynInt(DPEL_STRUCT);
ddi[2] = makeDynInt(0, DPEL_FLOAT);
ddi[3] = makeDynInt(0, DPEL_FLOAT);
ddi[4] = makeDynInt(0, DPEL_BOOL);
ddi[5] = makeDynInt(0, DPEL_TYPEREF);
dpTypeChange(dds, ddi);
}
You set to DPEL_TYPEREF and "string1" is the name and "DRIVE1" the DPTYPE
Re: DpTypeChange
Posted: Sun Nov 06, 2022 8:12 am
by boris_eli
kilianvp ,
thanks alot that's work