lulu Posted June 23, 2007 Share Posted June 23, 2007 Hi, I've been searching through the forums and my manuals for a way to automatically add the current filename and date to my title block, to no avail. I find it hard to believe that folks enter that information manually. Am I missing something? lulu Quote Link to comment
Gerrit Posted June 24, 2007 Share Posted June 24, 2007 I have a named text object inside my titleblock, and a script to update it with the filename and date. I need to launch this script (made it into a menu command), so it's not fully automatic. Quote Link to comment
jnr Posted June 25, 2007 Share Posted June 25, 2007 Earlier versions of the title block automatically added the filename and I think, updated the date. One would have thought at least the filename would auto update. Don't know why it was removed. Quote Link to comment
Vectorworks, Inc Employee Robert Anderson Posted June 25, 2007 Vectorworks, Inc Employee Share Posted June 25, 2007 Earlier versions of the titleblock have never auto-updated the date. Date updating has always used the Issue Manager, which give the user more control over official revision and issue dates. Quote Link to comment
eas Posted June 26, 2007 Share Posted June 26, 2007 Still, an autoupdating date would be an really handy thing to have--maybe not for the main date but off in the corner to keep track of drawings. I think it is a wish list item already. Quote Link to comment
jnr Posted June 27, 2007 Share Posted June 27, 2007 So Robert, what about at least auto updating the file name? Can we have it back? Quote Link to comment
Gerard Jonker Posted June 27, 2007 Share Posted June 27, 2007 Hi Lulu and others, I made a little command that does exactly this, you can use it from a scriptpalette, but you can also make a menu command, paste the code you find below and place this command in your workspace. make sure to also assign it the P for the keyshortcut and place the standard Print command in some obscure menu so you won't accidentally use that. You may not leave it out of the workspace, as my command will search for it there. (I have a '~' command for this very purpose) To use it, you place some textblocks in your drawing and assign them these classes: 'P-PRINTDATUM' and 'P-PRINTTIME' (without quotes). Then double click the script, or choose your Menucommand from the menu and ready you are. You may want to delete the three lines that have to do with printing "Black and White only". When you use this command, it looks like the text is inserted after the print command, but it is actually inserted before and will be used in the print. For inserting Filename and Path please check out this site: http://www.orangedust.co.uk/filepath.html Have fun with it, Gerard jonker -----------copy below this line-------------- procedure afdrukken; {****************************} {* Copyrights Jonker en Wu *} {* ir G.D.Jonker *} {****************************} var whatclas,tekst:string; aanuit:boolean; function Fplacedate(hd:handle):boolean; begin if gettype(HD) = 10 then {= text} begin whatclas:=getclass(HD); if (whatclas ='P-PRINTDATUM') then begin tekst := Date(0,0); if tekst = '' then tekst := ' '; {Not to throw away the text block, insert some spaces} settext(hd,tekst); end; if whatclas = 'P-PRINTTIME' then begin tekst := Date(2,2); if tekst = '' then tekst := ' '; {Not to throw away the text block, insert some spaces} settext(hd,tekst); end; end; End; {Fplacedate} begin{afdrukken} aanuit := Getpref(10); {register how you found B&W} setpref(10,true); {turn on B&W} ForEachObjectInLayer (Fplacedate,0,2,2) ; Redrawall; Domenutextbyname('Print',0); setpref(10,aanuit); {Reset to found B&W state} end; {afdrukken} run(afdrukken); 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.