question

Axel Kohonen avatar image
0 Likes"
Axel Kohonen asked Axel Kohonen edited

Way to set "Optimize Column for Lookup" with FlexScript

Hi,

Is it possible to set a certain column in a Global table in bundle mode to "Optimize Column for Lookup" with FlexScript and how in that case?

And is there any more info on when it i wise to use the column indexing which it seems that the optimization does according to this thread? I assume that it adds some overhead.

And if there would be something about this in the manual it would be great! Looked in the 18.0.2 manual as well.

Thank you!

Kind regards,

Axel

FlexSim 17.2.5
global tableflexscriptbundleoptimize column for lookup
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

Matthew Gillespie avatar image
1 Like"
Matthew Gillespie answered Axel Kohonen edited

data is the node holding the bundle data

startCol is 0 based

//Toggle on
applicationcommand("addindextobundlefield", data, startCol, BUNDLE_FIELD_INDEX_MAP);

//Toggle off
applicationcommand("removeindexfrombundlefield", data, startCol);
· 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.

jing.c avatar image jing.c commented ·

Hi @Matthew Gillespie.

It seems not working in 17.2. Does it only work in FlexSim2018?

0 Likes 0 ·
Axel Kohonen avatar image Axel Kohonen jing.c commented ·

Thank you @Matthew Gillespie

It works nicely! Any more info on when it makes sense to optimize columns and when not?

@jing.chen

It does work for me in FlexSim 17.2.5 so not sure what is not working for you.

0 Likes 0 ·