Jump to content
Sign in to follow this  
Thomas Wagensommerer

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

Share this post


Link to post

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

Share this post


Link to post

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

Share this post


Link to post

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 ]

Share this post


Link to post

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.

Sign in to follow this  

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...