Jump to content
Developer Wiki and Function Reference Links Read more... ×
Sign in to follow this  
Musisback

Control Points and path PIO

Recommended Posts

I Would like to know if there is and easy way to move the verticles from path PIO with the 2D selection tool.

It is possible for example with the rectangle or any line PIO. Thank you

Share this post


Link to post

A path PIO can be edited with the 2D reshape tool just like you would a polyline/polygon.

Line and rectangle PIOs can be edited with the selection tool.

Share this post


Link to post

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

Share this post


Link to post

C.

I have not had success with the path type object.

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

Share this post


Link to post
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!

Share this post


Link to post

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

Share this post


Link to post

Thanks for the answers..

It would have been nice to be able to activate the verticles from the path PIO to act like the control points of build-in objects.

(move with the selection tool)

However, the methode above is very interesting also.

Share this post


Link to post

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

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
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.

×