Jump to content

Date Within Title Symbol


Recommended Posts

I'm attempting a script that will enter a symbol with the definition of "title" and edit an object with the name of "date". I've got the date script written, but I get all kinds of errors in when I try to add it to editing a specific symbol definition.

Can anyone help me with this?

Attached is the change date and print script I wrote:

PROCEDURE DateandPrint;


dateNow : STRING;

obHd : HANDLE;


dateNow := DATE(1, 0);

obHd := GETOBJECT('Date');

SETTEXT(obHd, dateNow);




Link to comment


Is the object in the symbol a text object? I ran your script and got no errors changing a text object inside a symbol. VW 10.5.0 on MAC OS 10.2.8.

To see the changes to the symbol in your drawing you will have to put a RedrawAll; after the SetText(); command.

Even without the RedrawAll;, the printed output showed the updated date.


but I get all kinds of errors in when I try to add it to editing a specific symbol definition.

Since named objects are unique, you don't have to edit the symbol definition to modify the DATE string inside, just run the code you have above. There will only be ONE object in your file named DATE, and even if it is in a Symbol Definition, GetObject('DATE') will return a handle to it.

Can you list the errors you are getting, or the symptoms? Maybe I don't understand exactly what you are doing, so it will help clarify things.


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.

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