question

Patricia_brenny R avatar image
0 Likes"
Patricia_brenny R asked Jason Lightfoot edited

Apply new shape and location to moving flowitem.

Hey there,

I'm trying to change the shape, size and location of a flowitem that's already in movement, similarly to items in a conveyor, but using the SDK and C++.

tried using this setframe function and the set loc function but it simply didn't take effect.

for setFrame I used this:

setframe(item, getobjectshapeindex(otherItem));


Is there any other function I can use that will forcefully change the position and shape of a moving flowitem? Am I using setframe wrong?

FlexSim 23.0.1
flowitemmodule sdkdevelopment
· 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.

1 Answer

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot edited

The setframe command needs the frame number (or name) related to that flow item's frame list- not the shapeindex number of another object - which is the global media index of the shape as show here:

1678716921409.png

You can of course set the shape directly without reference to the frames using setobjectshapeindex()

Frame example attached.

ShapeFrameBottleTest.fsm


· 1
5 |100000

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