question

jyothi N avatar image
0 Likes"
jyothi N asked Matthew Gillespie edited

Source instance creation in model

Can we create 1000 sources at a time by x, y, z location coordinates from global table

FlexSim 18.2.2
createinstancetable class
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

Joerg Vogel avatar image
1 Like"
Joerg Vogel answered jyothi N commented

You use the command "createinstance". Please look into the manual: Reference > Coding in FlexSim > Command Reference.

The example creates there a source from the library in the model. After each creation of a source you set the location of the last object in the model. Then you create the next source.

· 4
5 |100000

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

tannerp avatar image tannerp commented ·
@jyothi N

Here's a simplified example of a model that automatically creates sources on model open using a trigger and the custom code explained by @Jörg Vogel.

Look in the "OnModelOpen" trigger for the code.

source-creation-global-table.fsm

0 Likes 0 ·
jyothi N avatar image jyothi N tannerp commented ·

i want to rename the source1 to source12 by some string names like S5Q0405693_1,.... .is it possible to apply using the global table and the same code

0 Likes 0 ·
jyothi N avatar image jyothi N commented ·

Thank you Tanner .This example will hep me alot

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel jyothi N commented ·

source-creation-global-table-tp-jv.fsm is enhanced with a column of names.

0 Likes 0 ·