question

Lars Christian J2 avatar image
1 Like"
Lars Christian J2 asked Lars Christian J2 commented

No OnDraw trigger for most FlowItems - Why?

Why is there no OnDraw trigger available on most FlowItems? Is it by design or ?

FlexSim 20.2.1
flexsim 20.2.1flowitemsondraw
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

·
Phil BoBo avatar image
1 Like"
Phil BoBo answered Lars Christian J2 commented

Yes, this is by design. Having an OnDraw trigger on flowitems causes slow rendering performance.

By default, flowitems have DRAW_FLAG_NO_ON_DRAW toggled on their drawflags attribute to improve rendering performance.

· 3
5 |100000

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

Lars Christian J2 avatar image Lars Christian J2 commented ·

OK...... @phil.bobo

0 Likes 0 ·
Allister Wilson avatar image Allister Wilson Lars Christian J2 commented ·

@lars_christian.j2 To expand a bit on Phil's answer, using that information you can add your own draw code to a flowitem if necessary.

In the attached (20.0) model, I

  • created a new flowitem: CustomDrawnBox
  • unset the DRAW_FLAG_NO_ON_DRAW flag
  • added an OnDraw attribute which includes a call to drawsphere

20200901_flowitem_custom_draw.fsm

2 Likes 2 ·
Lars Christian J2 avatar image Lars Christian J2 commented ·

Thanks @alistair.w

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.