Bobbyv33 Posted December 8, 2005 Share Posted December 8, 2005 I am trying to build a template that will have the correct date and file name in the title block when it prints. I followed directions on how to build the title block as a symbol and I can manually put in the information on the border info pallette, but I would much prefer if it updated automatically. Is ther a code so that when I attach the records the info is automatically entered? or when I print that it updates? Any help would be appreciated. Quote Link to comment
ionw Posted December 8, 2005 Share Posted December 8, 2005 Try this: Where: TITLE BLOCK = name of our title block sysmbol Title Block Info = name of the attached record Print_Date & File_Name = fileds in the record PROCEDURE PrintDate; { Ion Webster 2005 } Procedure SetField(h :HANDLE); BEGIN SetRField(h,'Title Block Info','Print_Date',Date(2,0)); SetRField(h,'Title Block Info','File_Name',GetFName); END; BEGIN DSelectAll; ForEachObject(SetField ,((S='TITLE BLOCK') & (T=SYMBOL))); END; Run(PrintDate); Quote Link to comment
David Ormsby Posted December 9, 2005 Share Posted December 9, 2005 Ion I had just asked almost the same question in another topic! I tried your script, and it works great on the symbol by itself, but doesn't work in the new integrated drawing border/titleblock PIO in VW12. Thanks for the tip though! Quote Link to comment
Bobbyv33 Posted December 14, 2005 Author Share Posted December 14, 2005 Forgive my ignorance, but I have really never made or worked with vectorscript. I have tried to create the scrip you wrote, I copied and pasted Starting with PROCEDURE PrintDate; "into a new edit window, changed the field names as described and tried to run, but nothing happened, not even an error. Obviously the script works and I have done something wrong. any help would be appreciated. thanks in advance Quote Link to comment
ionw Posted December 15, 2005 Share Posted December 15, 2005 You need to fulfill the first three lines: You need to make a new resource:Record named Title Block Info in your document that has at least two TEXT fields. name these: Print_Date File_Name Or come up with your own names for the fields and or the record, but if you do that change therespective names in the script to match your naming convention. You need a symbol that is named TITLE BLOCK, or as above change the name and match it in the script. In the symbol make two text fields and select each one in turn, and under the organize menu (Modify VW12) choose link text to record, and choose the rtecord you made, and then the appropriate field. That should do it. HTH Quote Link to comment
Recommended Posts
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.