Jump to content
Developer Wiki and Function Reference Links ×

Custom PIO does not adopt Class attributes?


VvierA

Recommended Posts

Hello,

I made a custom 2d path object tool to generate special 2d polygons.

It works great and I can use the tool to generate the polygons.

The problem is:

If I try to change the class of the PIO afterwards the polygon does not adopt the graphic attributes (line color, line weight etc.) of the new class.

Do you have any hints?

Thank you,

VvierA

P.S.

I generate the polygon by using the 2d path tool and with 'CreateDuplicateObject'.

Link to comment

When you change the class, it only changes the pio itself, the container, but not the objects contained within. This behavior is the same as in symbols, where the symbol can belong to a different class from the objects it contains.

You need to get the name of the pio class and then set it as the active class so that all the objects drawn within the pio are created under the same class.

I use this flexibility to hide or change the appearance of the objects. I usually create the pio with a class for a group of related pio's (i.e. furniture,signals,etc) so that the whole group can be hidden in certain views. The objects within are created in other classes to show different states as in existing, proposed, removed, salvaged, etc.

Link to comment

Cool, thank your for that hint. I used GetClass and SetClass to get the Class of the PIO and assign it to the polyline.

May I ask another thing?

I try to scale the symbol that is placed together with the polyline as a part of the custom PIO.

I tried ScaleObjectN but it needs a constant (?) named 'const WorldPt&' as scale center. I do not know what that is? How can I define the scale center with just one value?

http://developer.vectorworks.net/index.php?title=VCOM:VectorWorks:ISDK::ScaleObjectN

VvierA

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