Koos van de Linde Posted January 16, 2006 Share Posted January 16, 2006 I hav a vectorscript that changes several plugin objects (point objects) interactively. After changing one object, I like to see the result before changing the next one. I tried tot redraw the first PO in the following way: .... { change PO with handle h1 } ResetObject(h1); RedrawAll; .... but still the PO is not redrawn on the screen until after the whole procedure is ready. Because I have to see the result of the previous action before I can change the next PO properly, this is very unpractical. Also the following 'tricks' That I tried, dont work: .... { change PO with handle h1 } ResetObject(h1); h2:=Hduplicate(h1,0,0); DelObject(h1); RedrawAll; .... (the new copy too will initially be drawn as the unchanged original and is only redrawn after the end of the whole procedure). .... { change PO with handle h1 } ResetObject(h1); Hmove(h1,1,0); Hmove(h1,-1,0); DelObject(h1); RedrawAll; .... The only thing that probably will work, is creating a new instance of the PO and copying alle the fields of the original to the new one, in the following way: GetSymLoc(h1,x1,y1); a1:=GetSymRot(h1); h2:=CreateCustomObject(OjbName,x1,y1,a1); str1:=GetRField(h1,RecName,Field1); SetRField(h2,RecName,Field1,str1); str1:=GetRField(h1,RecName,Field2); SetRField(h2,RecName,Field2,str1); . . . str1:=GetRField(h1,RecName,FieldN); SetRField(h2,RecName,FieldN,str1); DelObject(h1); RedrawAll; but isn't there really no better and faster method? Quote Link to comment
Koos van de Linde Posted January 16, 2006 Author Share Posted January 16, 2006 Even my last suggestion doesn't work. Apparently the code of the PO is only runned after completion of the code of the procedure (a command plug in). Is there a way to force the code of the PO to run before completion of the command? 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.