Jump to content
Developer Wiki and Function Reference Links ×

Redraw problems with custom tools


MikeCutter

Recommended Posts

Thanks for your reply. Below is the code for the simplest tool, but is representative of all of them. Basically, I'm just accessing or importing an existing symbol(s) into the document. In 12.5, the plug-in won't display until I access the Class or Layer visibility dialogs.

PROCEDURE Chairs;

VAR

strChair : STRING;

{$INCLUDE MLCFunctions.vss}

BEGIN

strChair := pChair_Type;

If IsSymbol(strChair)=True then begin {make sure Chair symbol is in document - custom function in MLCFunctions.vss}

Symbol(strChair,0,0,0); {place Chair in document}

end;

END;

RUN(Chairs);

Here's the IsSymbol function from the MLCFunctions.vss file

Function IsSymbol(strSymbol:STRING):BOOLEAN; {Checks current document for a symbol, and imports it from Symbol Master if it doesn't exist}

BEGIN

IF GetObject(strSymbol)=NIL THEN BEGIN {symbol does not exist in current document}

{Copy symbol definition to current document - make sure it exists}

IF CopySymbol('G:\Symbol Master.mcd',strSymbol) = True THEN BEGIN

IsSymbol := True; {succesfully imported symbol from Master Symbol Library}

END

ELSE BEGIN

IsSymbol := False; {couldn't find Library and/or symbol within Library}

END; {if CopySymbol}

END

ELSE BEGIN {symbol exists in current document}

IsSymbol := True;

END; {if GetObject}

END;

Edited by MikeCutter
Link to comment

Mike, I don't see anything wrong with your code. I do see the same problem a PIO that uses other PIOs instead of Symbols to redraw. Neither Redraw or ResetObject seem to get it to display properly that first time. It requires at least one "reset" event to happen.

I thought I remembered reading a thread in this group some time ago where you could get force a reset by changing the lineweight and then changing it back. You might try searching for that info.

Good luck,

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