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

GetCustomObjectInfo

Recommended Posts

Ok, I am looking for a way to have my object script, in a plugin, to redraw when the drop menu is changed from one view to another.

I have a piece of pipe and I want there to be an end view(Circle) and a side (Rect) view. I know how to get the script to draw the correct object initially but do not know how to get the script to update and redraw based on a change in the object info menu.

Will the (GetCustomObjectInfo) command return to the script and have the object redraw, If not what comand should I use?

ThanksPhil Sacchitella

Share this post


Link to post

quote:

Originally posted by newbarndesign:
.......Will the (GetCustomObjectInfo) command return to the script and have the object redraw, If not what comand should I use?

ThanksPhil Sacchitella

Hi,Someone may correct me please if i am wrong, buti try to answer to your question;-)

I don't believe that GetCustomObjectInfo will regenerate your PIO.

Are you using VW 8? If i remember right PIO'sshould redraw automaticly if you make changings inthe object info palette, but there was a bug in VW 8...Try to get the PIO's class and then reset the class ( 'h' is the handle to the PIO itself), this will force a redraw of the PIO:

StringVariable:=GetClass (h) ;

SetClass(h, StringVariable);

I hope it helps ( and i remember right wink.gif" border="0 )

-Hannes

Share this post


Link to post
Guest

I think there's a little confusion here. You shouldn't have to redraw your object when the view changes just to show different aspects of the object. Instead, your object's script should draw the object in 3D, and then let VectorWorks worry about representing it appropriately. In your case, instead of having your script draw the pipe as a rectangle for side view and a pair of concentric circles for end view, your script should draw the pipe as a 3D extruded object. VectorWorks will display the object appropriately for the current view, and will call your script to redraw the object only when something happens that would cause the geometry to change, as when a user changes the value of one of the PIO's parameters.

Hope that helps.

Caleb.

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.

×