question

Yokota T avatar image
0 Likes"
Yokota T asked Yokota T commented

I think the illustration in "Implementing Module DLLs" is wrong.

Hello all,

I think the fifth illustration in Implementing Module DLLs is incorrect.

1683630228262.png

According to this figure, beginOffset() is supposed to override to always return 0.0, but when I set it as shown, MyTaskExecuter does not work at all.

I am guessing that

return beginOffsetDefault(endspeed, item);

would be correct. Am I right in my assumption?

Thank you in advance.

FlexSim 23.1.1
module sdkdll
1683630228262.png (17.8 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered Yokota T commented

Thank you for pointing this out. I agree that returning 0.0 is incorrect. Your solution is correct in this case. However, for the documentation, I will probably change it to:

double MyTE::beginOffset(double endspeed, treenode item)
{
  if (xOnly) {
    offsetloc[1] = 0;
    offsetloc[2] = 0;
  }

  return __super::beginOffset(endspeed, item);
}

This code means this: update the offset, and then do whatever TEs normally do.

I will add a case to the dev list to fix this issue.

· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jordan Johnson avatar image Jordan Johnson ♦♦ commented ·
Actually, given the documentation talks about using beginOffsetDefault(), I'll use your suggestion exactly. Thanks again!
0 Likes 0 ·
Yokota T avatar image Yokota T Jordan Johnson ♦♦ commented ·

Thank you for your reply.

You're welcome!

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.