Jump to content
Developer Wiki and Function Reference Links ×

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

Link to comment
  • 3 weeks later...

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

Link to comment

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.

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