Jump to content
Developer Wiki and Function Reference Links Read more... ×
Sign in to follow this  

Redraw problems with custom tools

Recommended Posts

I recently converted from 10.5 to 12.5.1. Many of my custom point-object plug-ins do not display upon creation, and also blank a portion of the screen upon reset. I've tried adding the Redraw and RedrawAll commands at the end of the script, but even that doesn't fix it. Any suggestions?

Share this post

Link to post

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.



strChair : STRING;

{$INCLUDE MLCFunctions.vss}


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}




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}


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}



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

END; {if CopySymbol}


ELSE BEGIN {symbol exists in current document}

IsSymbol := True;

END; {if GetObject}


Edited by MikeCutter

Share this post

Link to post

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,

Share this post

Link to post

I FOUND THE PROBLEM!! If the Symbol Library is saved with the symbols' classes set to invisible, they don't appear at first when "imported" into a new drawing, regardless if the class is set to visible on the new drawing.

Thanks for your help.

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114


© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.