Jump to content
Developer Wiki and Function Reference Links ×

Control Points and path PIO


Musisback

Recommended Posts

Sleg -

It has been a while since I worked with this, but here are some things I believe I learned when builing a Path PIO:

1) Make sure your PIO is Event-Enabled.

2) Set the following constants:

kObjXPropSpecialEdit = 3;

kReshapeSpecialEdit = 3;

kObjXPropEditGroup = 1;

kObjXPropEditGroupPath = 2;

3) Insert the following lines in the Initial Properties section of your code:

gFlag := SetObjPropCharVS(kObjXPropSpecialEdit, Chr(kReshapeSpecialEdit));

(If I remember correctly, I needed this to enable the Path to be reshaped when the PIO instance is double-clicked.)

gFlag := SetObjPropCharVS(kObjXPropEditGroup, Chr(kObjXPropEditGroupPath));

(This line was needed in order to allow the Path/Profile dialog to be skipped and the PIO to be reshaped in-place and not from the Path Edit view.)

I hope this helps...and I'm sure someone will correct me if my memory is a bit foggy...

Link to comment
I have not had success with the path type object.

Would you be so kind as to share an example?.

Check out the PIOs at the bottom of The VectorScript Examples Page. One of them is a 2D Path PIO. All are unencrypted so you can get under the hood to see how things work.

You might also find value in Charles Chandler's Intro To Script Events. Some of what he discusses there is relevant to Path PIOs.

Good luck!

Link to comment

An addendum to Andy's event enabled comments.

You can edit any path PIO with the 2D Reshape tool (at least starting with something like VW12) whether it's event enabled or not.

If you are developing a path PIO and want it's default edit behavior (when the user selects Modify>Edit, double-clicks on the object, or selects Edit after right-clicking the object) to be an in-place reshape, you need to set the properties outlined above. As a default when you edit a path PIO, you will see a dialog asking you to choose between path and profile. The path edit screen shows only the path, like editing a symbol or a group.

HTH,

Josh

Link to comment

Sleg,

Think of a path PIO as a polygon, but instead of drawing lines for sides it draws something fancier. So the edit behavior should work, just like polygons ? the selection tool moves the entire object, the reshape tool moves the vertices. The Adobe suite functions similarly, with separate selection tools for objects and vertices.

-Josh

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