question

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

Why does the ASRS move when I copy a plane that has an ASRS on it?

Hi,

I was making a user library item by putting resources on a plane. One of the resources is an ASRS vehicle. When I save the plane in a user library or just copy the plane the ASRS the base of the ASRS changes location while the ASRS itself stays in the same place. The same happens when rotated 90 degrees, but the offset seems larger. The location stays the same within the plane for conveyors and other objects. See the attached image and model 20161007-asrsmoveswhenplaneiscopied.fsm.

What is causing this and can it be stopped somehow?

Thank you!

Kind regards,

Axel

FlexSim 16.2.0
planeasr
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

Phil BoBo avatar image
1 Like"
Phil BoBo answered Axel Kohonen commented

The ASRSVehicle's OnCreate code positions the rails based on where the ASRSVehicle was dropped.

When you copy/paste it, that code is firing, but the dropx(), dropy(), and dropz() values are the position of the last thing dropped into the model, which is unlikely to be the ASRSVehicle that you are copying.

The container plane and its rotation are unrelated to the bug. What matters is the location where an object was last dropped into the model.

This is a bug, and I'll a note to the development list.

To fix it, you need to set the railx, raily, and railz variables on the ASRSVehicle. You can do this easily by selecting the new ASRSVehicle in red, highlighting the old ASRSVehicle in yellow, then using the Edit Selected Objects window to Copy From Highlighted > All Variables.

· 3
5 |100000

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