DpTypeChange

Discussion about recent product features & solutions!
Search

Post Reply
3 posts • Page 1 of 1
boris_eli
Posts: 6
Joined: Sun Oct 02, 2022 11:14 am

DpTypeChange

Post 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 ? :roll: :roll:
thanks alot !!

User avatar
kilianvp
Posts: 422
Joined: Fri Jan 16, 2015 10:29 am

Re: DpTypeChange

Post 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

boris_eli
Posts: 6
Joined: Sun Oct 02, 2022 11:14 am

Re: DpTypeChange

Post by boris_eli »

kilianvp ,
thanks alot that's work

Post Reply
3 posts • Page 1 of 1