Jump to content
Developer Wiki and Function Reference Links ×

how to redraw a plugin object immediately?


Recommended Posts

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?

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