Jump to content
Developer Wiki and Function Reference Links ×

Wanted: Vectorscript Command for Plugin Objects


Recommended Posts

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

Link to comment

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 ]

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