Jump to content
Developer Wiki and Function Reference Links ×

Updating PIO's trough script


Recommended Posts

Looking for a way to let a PIO recalculate itself trough another script.

Yes with SetRField we can change parameters, and even "calculated parameters" but hence it would be so much easier if the last one is done by the PIO.

My current workaround:

Right now i've set the PIO properties to reset on rotate, in my script I let the object rotate 0 degrees, the reset works fine and for this PIO its great because I never need to rotate it.

Does anyone have a better workaround ? I don't like using the rotation event

Edited by hippothamus
Link to comment
  • Vectorworks, Inc Employee

Correct. The PIO won't update until after your current script finishes. Are you saying that setting it's rotation (with the PIO set the reset on rotated) will trigger the PIO to update while the dialog is open? If so, a similar approach might be to have it reset on move and move it by (0, 0). I haven't tried this via script, but I use the same technique to manually force PIO to update.

Link to comment
Correct. The PIO won't update until after your current script finishes. Are you saying that setting it's rotation (with the PIO set the reset on rotated) will trigger the PIO to update while the dialog is open? If so, a similar approach might be to have it reset on move and move it by (0, 0). I haven't tried this via script, but I use the same technique to manually force PIO to update.

Sorry deleted my earlier post.

I've got something weird going on that some of the data is changed right away, others after closing the listbrowser. Going to test some more before commenting

Link to comment
Correct. The PIO won't update until after your current script finishes. Are you saying that setting it's rotation (with the PIO set the reset on rotated) will trigger the PIO to update while the dialog is open? If so, a similar approach might be to have it reset on move and move it by (0, 0). I haven't tried this via script, but I use the same technique to manually force PIO to update.

Allright I've got 3 problems:

One: the object needs to be updated AFTER I close the Listbrower. This is done trough the rotate 0 degrees and "reset on rotate". (solved)

My list browser shows some paramaters that are calculated by the PIO. The list gives the option to change the subparams and i'm looking into getting the NEW calculated param into the listbrowser without hardcoding the same formula :(

My listbrowser shows parameters that are instantly changed trough a popup. This works on everything besides booleans. The changes only get affect on closing the listbrowers, not on closing the popup. While the normal "strings/integers" are changed instantly :/ Doesn't make sense to me. Why can't I directly update Booleans ?

Edited by hippothamus
Link to comment
  • Vectorworks, Inc Employee

Ok. So the PIO does NOT update any parameters in the dialog while it's open. For a moment, I thought you managed to get some to update. I think there's no good way to do this because of the serial nature of vectorscript. One script must complete before another script can run. This is a long shot, but if what you're trying to do can be done through a worksheet database (rather than a dialog), you might get what you need that way. Otherwise, I've got nothin'...

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...