Applying new animation to multiple processors in a model

Applying new animation to multiple processors in a model

babar_koraishy
Not applicable
27 Views
5 Replies
Message 1 of 6

Applying new animation to multiple processors in a model

babar_koraishy
Not applicable

[ FlexSim 24.0.1 ]

Hello,


I have a model with many processors (with custom graphics). I created a custom library for these objects, and it has worked well.

Now i want to add an animation to these processors. I dont want to go and replace each processor, its connections etc with a new custom object (which has the animation). Is it possible to somehow 'paste' that animation on to existing objects?


Regards

BK

0 Likes
Accepted solutions (1)
28 Views
5 Replies
Replies (5)
Message 2 of 6

joerg_vogel_HsH
Mentor
Mentor

@Babar Koraishy, try it with tool called edit selected object.

0 Likes
Message 3 of 6

jason_lightfootVL7B4
Autodesk
Autodesk
Accepted solution

This script should copy to the selected objects (from Processor1 in this example):

Object origin=Model.find("Processor1");
Object target;
treenode newvisuals= color(origin).up;
Array selobjects=Table.query("SELECT ARRAY_AGG(Object) FROM Objects() WHERE switch_selected(Object,-1)")[1][1];
while (selobjects.length){
    target=selobjects.pop();
    createcopy(newvisuals,color(target).up,1,0,0,1);
    rebindobjectattributes(target);
}
0 Likes
Message 4 of 6

arunTTT2P
Explorer
Explorer
Will this script copy surrogates also?
0 Likes
Message 5 of 6

jason_lightfootVL7B4
Autodesk
Autodesk
No - thanks for pointing that out - I'll update it.
0 Likes
Message 6 of 6

babar_koraishy
Not applicable

Thanks, the script worked really well, appreciate your help

0 Likes