Jump to content
Developer Wiki and Function Reference Links ×

How do you update (redraw) drawing during script execution?


David L

Recommended Posts

I have the following script that consecutively numbers doors as you click on them, but the numbering only shows after you complete the script. I would like it to update (redraw) the drawing as you click on each door (so you can see the new door number) during the script execution.

I've tried everything I can think of (ResetObject, ReDraw, ReDrawAll, etc.) but nothing seems to update during script execution. Any recommendations are appreciated.

=================================================================

PROCEDURE NumberDoorsConsecutive;

VAR

???numberStr : STRING;

???h,h2 : HANDLE;

???pX,pY : REAL;

???doorNumber,dummyVar : INTEGER;

PROCEDURE SetDoorNumber;

BEGIN

GetPt(pX,pY);

??IF GetRField(h2,'Door','IDLabel') <> '' THEN BEGIN

????SetRField(h2,'Door','IDLabel',numberStr);

????ResetObject(h2);

????doorNumber := Str2Num(numberStr); {convert number string to number}

????numberStr := Num2Str(0, doorNumber + 1); {increment number then convert to number string}

??END;

END;

BEGIN

numberStr := StrDialog('Enter and INTEGER to start numbering:','101');

Message('Click in empty space to end Door numbering');

??WHILE GetPickObjectInfo(pX,pY,h,h2,dummyVar) DO BEGIN

????SetDoorNumber;

??END;

ClrMessage;

END;

RUN(NumberDoorsConsecutive);

Plug-In command is also attached:

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