Thomas Wagensommerer Posted January 9, 2003 Share Posted January 9, 2003 Vectorscript should have some means to determine which parameter of a plug-in object has been last modified by the user. Imagine a plugin with interdependent parameters. For instance: Top - Bottom - Height. Currently this makes no sense. Only two of them can accept user input and the third is calculated by the script. If the script can retrieve which one was last modified, all three can accept user input. For instance: If LastChange(Top) then recalculate Height If LastChange(Bottom) then recalculate Height If LastChange(Height) then recalculate Top DrawTheNewObject Quote Link to comment
matto Posted January 11, 2003 Share Posted January 11, 2003 yep one vote here. that could have all sorts of uses. Quote Link to comment
Alexandre Villares Posted January 11, 2003 Share Posted January 11, 2003 Just a comment... Using VS as it is now you can have a pop-up paramenter named 'calculate:' top / bottom / height And then use some code to force the calculated stuff into the OIP On VW10 you can even make the calculated paramenter show greyed or be invisible Quote Link to comment
ccroft Posted January 11, 2003 Share Posted January 11, 2003 Alexandre Could you give me a hint on "forcing stuff into OIP' like function names? This sounds very useful. I'm still running 8.5.2 and I don't see anything. TIA Charles Quote Link to comment
Alexandre Villares Posted January 13, 2003 Share Posted January 13, 2003 First you'll need to find the Plug-in Object's handle (PIOHandle). Then use SetRField. Note that the parameter value must be passed as a String, even if it's a Real or Integer parameter (note the Num2Str() I used). IF GetCustomObjectInfo(PIOName, PIOHandle, recordHand, wallHand) THEN BEGIN {...} SetRField(PIOHandle,Getname(recordHand),'parametername', Num2Str(8,RealNumberParameter)); {...} END; Also beware that the Pparametername is a sort of constant that will remain the same until the user changes something at the OIP. So if you change a parameter using this procedure and you need to use the updated value, you'd better use some variable to store it or you'll have to use GetRField. HTH [ 01-13-2003, 06:09 AM: Message edited by: Alexandre B A Villares ] Quote Link to comment
Recommended Posts
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.