question

SudheerReddy avatar image
0 Likes"
SudheerReddy asked Jason Lightfoot edited

How to draw line between two objects

I am trying to draw line between Queue1 and Queue3

and Queue2 and Queue4

Below is the code I am trying. But not sure how to draw line

Attaching the model for refernce

draw.fsm

FlexSim 20.0.10
drawdraw line
1620216159016.png (31.8 KiB)
draw.fsm (28.9 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.

Phil BoBo avatar image
2 Likes"
Phil BoBo answered Jason Lightfoot edited

You need to call drawline() from an On Draw trigger.

Attached is your model, modified to draw a line from Queue1 to Queue2 from within Queue1's On Draw trigger.

draw_1.fsm


draw-line.gif (167.7 KiB)
draw-1.fsm (29.5 KiB)
· 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.

Jason Lightfoot avatar image
2 Likes"
Jason Lightfoot answered

I added a shape to your model whose onDraw trigger draws the line. It isn't currently possible to draw a line once and have that become an object in its own right that automatically drawn. The line needs to be drawn for every frame - hence the use of the onDraw trigger that fire's every time the screen is drawn.

draw_jl.fsm


1620221931039.png (28.8 KiB)
draw-jl.fsm (29.3 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.