AFDesign Posted May 10, 2011 Share Posted May 10, 2011 Hi to all, i can't find the function for activate a "control point" freely movable by user. I'll try to explain better. I have a linear object, so (in 2D) i have 2 control points for start and finish. I need a third control point, visible in 2D, and i need to know x and y of this point (like the positioning of text in space tool). How can i do it? Thanks, and sorry for my english, i hope you understand what i mean. :blush: Quote Link to comment
Miguel Barrera Posted May 10, 2011 Share Posted May 10, 2011 You need to add a Control Point parameter to the plugin definition. By default they are named in concecutive order so the first one will be named "ControlPoint01". You can get the x & y location either by calling the constants PCONTROLPOINTO1X & PCONTROLPOINT01Y or through the GetRField procedure with 'ControlPoint01X' & 'ControlPoint01Y' as the field names. As with any other parameter, the x & y values will be visible in the Object Info Palette (OIP) and to hide it you will need to set the parameter visibility to FALSE. Quote Link to comment
AFDesign Posted May 11, 2011 Author Share Posted May 11, 2011 Thanks very much Miguel! Andrea Quote Link to comment
AFDesign Posted June 13, 2011 Author Share Posted June 13, 2011 (edited) Is it possible to hide the control point parameter from the "default parameters" showed when I click the tool bar button (attached image)? I can't rename it so in this case I can't use "__name" to hide it, and if I use "SetParameterVisibility" it only hide the parameter from the OIP! Edited June 13, 2011 by andreavw Quote Link to comment
Vectorworks, Inc Employee klinzey Posted June 13, 2011 Vectorworks, Inc Employee Share Posted June 13, 2011 In order to hide the parameters during the preference event the object must be event enabled. During the preference or setup event you can hide the control using: PROCEDURE vsoWidgetSetVisible(widgetID : LONGINT; visible : BOOLEAN); http://developer.vectorworks.net/index.php?title=VS:Parametric_Custom_Shape_Pane Quote Link to comment
Miguel Barrera Posted June 13, 2011 Share Posted June 13, 2011 Depending on your target version, vsoWidgetSetVisible may not work as it was only resently implemented. For this reason, I only add the parameters that I want visible in the OIP with FUNCTION vsoAppendParamWidget( parameterID :LONGINT; text :STRING; data :LONGINT) :BOOLEAN; which will work with VW 2008 & up. Quote Link to comment
AFDesign Posted June 14, 2011 Author Share Posted June 14, 2011 Thank you all! I make it event enabled; adding parameters by function is too complicated for me ! 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.