Missing green icon on list shared asset

Missing green icon on list shared asset

clair_augsburgerZGWRZ
Collaborator Collaborator
42 Views
6 Replies
Message 1 of 7

Missing green icon on list shared asset

clair_augsburgerZGWRZ
Collaborator
Collaborator

[ FlexSim 23.0.3 ]

Hi,

Open the attached model Green icon on list.fsm.

There is a global list GlobalList1 with 3 entries:

1677233534021.png

In Process Flow, there are 2 list shared assets (List1 and List2), who are both referencing the same global list GlobalList1, in 2 different ways:

1677233645953.png

1677233656700.png

The green circle on List1 correctly displays the number of entries in the list, whereas this information is missing on List2.

Would it be possible to also display the number of entries in the list in the green circle when we use the syntax List("ListName") ?

0 Likes
Accepted solutions (1)
43 Views
6 Replies
Replies (6)
Message 2 of 7

joerg_vogel_HsH
Mentor
Mentor
@Clair A, one is a pointer, the other a constructor.
0 Likes
Message 3 of 7

clair_augsburgerZGWRZ
Collaborator
Collaborator

@Joerg Vogel I know. My question is not what's the difference between Tools/GlobalLists/GlobalList1 and List("GlobalList1").

0 Likes
Message 4 of 7

joerg_vogel_HsH
Mentor
Mentor
Yes, I know, but maybe there is a small difference when a pointer or a constructer gets evaluated. They both reference a list. But the mechanism may differ.
0 Likes
Message 5 of 7

Matthew_Gillespie
Autodesk
Autodesk
Accepted solution

The code that draws that circle only counts the number of entries if the list references is a pointer. This is because draw code fires very frequently and anything that takes time to evaluate will significantly slow down the framerate of the draw.

When you set the list reference to be List("List1") that makes the reference a FlexScript code reference and that draw code would have to execute the code on that node and evaluate which list it returns. This is an expensive operation and will slow down the drawing of the view, so the draw code skips over that evaluation.

If you want to see the entries icons, make the reference a direct pointer.



Matthew Gillespie
FlexSim Software Developer

Message 6 of 7

clair_augsburgerZGWRZ
Collaborator
Collaborator
Thanks for your feedback Matthew. The user who reported this issue to us is building user libraries.

For example:

  • an Object Process Flow uses a reference to a global list with a direct pointer
  • you add the global list to the library
  • you add the object to the library (which also adds its Object Process Flow)
  • if you drag & drop the global list and the object in a new model, in the Object Process Flow the direct pointer to the global list is broken, it uses an internal list instead.

That's why when working with global lists in user libraries I think it's better to use the syntax List("ListName"), but then you loose the entries icon. I understand that for performance reasons the icon is not displayed. At first sight this user reported this issue to us because he thought it was a bug.

0 Likes
Message 7 of 7

Matthew_Gillespie
Autodesk
Autodesk
If you're building a user library, you could add a line of code to the OnDrop of the process flow object to set the list reference with a pointer to the global list.


Matthew Gillespie
FlexSim Software Developer

0 Likes