Jump to content
Developer Wiki and Function Reference Links ×

Not able to move Control Point?


SamIWas

Recommended Posts

I am working on a PIO which contains a control point.  I added it just as I have in other PIOs.  However, in this PIO, I am unable to move the control point using the cursor.  The cursor does not change to the little arrows when I hover over the control point, and I cannot select it and move it.  It does in another PIO I wrote.  I cannot figure out why.  Any ideas?

 

EDIT:  Figured this out, but thought I'd leave this up in case anyone ever searches.  You apparently have to have an object directly affected by the control point.  So I just assigned a locus to the control point and it now works. Previously, I was just assigning the control point values to variables, and using those in the script.  Can't do that.

Edited by SamIWas
Link to comment

And to expand on this:

 

Parameters in PIOs are read at the beginning of the script and stored at the end of the script. The value of a given parameter is the same for the entire single run time of the script. So if you want to be able to change something and use those changed values inside the script, you need to read the Parameter into a Variable and then modify the variable. You then need to store the value in the variable back to the parameter before the end of the script.

 

So I don't think you have to have an object. You just have to use variable to control the Control Point instead of Parameters.

Link to comment

I think your experience is a red herring. You do not need to have an object at the control point, and there isn’t even a mechanism to “assign” and object to a control point. 
 

VS objects can only have 2D control points, so your object needs to have at least one 2D element. Otherwise, you may not be able to snap to the control point unless you draw an object at its location, however you should still be able to drag the handle. 
 

If screen plane is enabled for your drawing, you also won’t be able to grab control points for 2D-only objects if they are not in screen plane. 
 

Reshape behavior is controlled by the selection tool modes — you need to have reshape or multi-reshape enabled. 
 

@Pat Stanford’s advice is good best practice, but I’m not sure how it apples here. A control point is essentially a paired X/Y parameter. 
 

And to clarify, parameter access with PParameterName is essentially reading a constant. If you want to write to a parameter, you need to use SetRField(). Some parameters, like long strings, work best retrieving with GetRField(). If you anticipate modifying a parameter during script execution, best practice is to load the parameter into a variable at the start of the code, and if you want the modified value to save, write the variable back to the field at the end of the code. 

  • Like 1
Link to comment
On 12/4/2022 at 12:44 PM, JBenghiat said:

I think your experience is a red herring. You do not need to have an object at the control point, and there isn’t even a mechanism to “assign” and object to a control point. 

 

Also...@Pat Stanford

 

You are correct.  It was a red herring.  What I have found is that if your control point defaults to 0/0, and you have nothing but a 2D locus for the 2D portion (I haven't started building the 2d yet), you cannot move the control point.  Once I added just a rectangle, I had control of it.  If I remove the rectangle, I again cannot select and move the control point.  That's fine, I plan on having 2D stuff drawn.

Edited by SamIWas
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...