newbarndesign Posted November 27, 2001 Share Posted November 27, 2001 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 Quote Link to comment
Hannes Posted December 16, 2001 Share Posted December 16, 2001 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 ) -Hannes Quote Link to comment
Guest Posted December 16, 2001 Share Posted December 16, 2001 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. Quote Link to comment
newbarndesign Posted December 18, 2001 Author Share Posted December 18, 2001 Thank you, I got it to work. I just need to be able to access and assign variables in text files now. ThanksPhil Quote Link to comment
Recommended Posts
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.