question

Hai L2 avatar image
0 Likes"
Hai L2 asked Mikael B commented

Duplicate objects (multiprocessor, processor, operator) in code?

Is there a quick way in code to duplicate the existing 3d object and its settings?

I have a default multiprocessor defined that I like to duplicate and relocate during model reset.

FlexSim 20.1.2
flexsim 20.1.2custom codemultiprocessorduplicate
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
0 Likes"
Matthew Gillespie answered Mikael B commented

You can use the createcopy() command. For example:

  1. Object defaultMultiProcessor = Model.find("MultiProcessor1");
  2. Object newObject = createcopy(defaultMultiProcessor, model());
  3. newObject.location = Vec3(5, 5, 0);
· 6
5 |100000

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