Jump to content
Developer Wiki and Function Reference Links ×

Disable reset on move from script;


Recommended Posts

I have PIO's that set there position from the position of other objects (parents). So in there scripts, there is a move3Dobj(objhd, ...) procedure.

were objhd is the PIO itself.

it works pretty well, but for big drawings with a lot a different object, changing the position of some objects result in reseting of a lot of other ones and that can take time. (up to a several seconds)

I found out that when an object is moved by the user the object script executes twice. The first time because it was moved.

so it reset there position by calling the move3Dobj procedure. And a second time because it was moved by the first execution of the script.

So I wonder if it is possible to disable the 'reset on move' of a PIO from a script.

Edited by musisback
Link to comment

As far as I know you cannot disable it by a function call. However, you can prevent the move3Dobj procedure from executing in the script.

If the currently executing pio is part of the list then exclude it from the procedure:

IF objhd <> curPioHd THEN

move3Dobj(objhd);

You can further perform selective execution by sending messages to other pio before moving or resetting them. For example, only those receiving a 'move' message will be included in the move3Dobj procedure.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...