question

Pawel Pawlewski avatar image
1 Like"
Pawel Pawlewski asked Phil BoBo edited

Bug in FlexSim 2018.0 in createcopy command.

Hi

in 18.02 & 18.04 the command createcopy doesn't work correctly!

I put plane on the 3D area as Plane3 and next Robot on this Plane3, I put second plane as Plane 4.

I write script: createcopy(model().find("Plane3/Robot1"),model().find("Plane4"))

I got

I press Reset and ....

It works correctly in 17

All the best from Poznan

Pawel

FlexSim 18.0.4
bug
slide1.png (8.6 KiB)
slide2.png (11.5 KiB)
slide3.png (14.4 KiB)
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
2 Likes"
Phil BoBo answered Phil BoBo edited

This is not a bug. In FlexSim 2018, task executers now default to having a reset position, which includes the object's location, rotation, size, and container.

What is happening is that you are copying the robot, but not changing the reset position of the copy. So when you reset the model, it sets the copy's position back to the original's position.

You can explicitly set an object's reset position by calling setresetposition() and passing the object. For example, to fix your issue, you can call:

treenode copy = createcopy(model().find("Plane3/Robot1"),model().find("Plane4"));
setresetposition(copy);
5 |100000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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