Taproot Posted September 18, 2008 Share Posted September 18, 2008 I'm in the process of updating our office text standards. I'd like to have presets for Text Heading/Body/Title/ etc... Given the absence of text definition by class or 'text styles' I'm exploring using the "Custom Tool/Attribute" script pallet as a way of establishing standard settings. Is there a better way? Have any of you found what you think is the optimal workflow? Quote Link to comment
Pat Stanford Posted September 18, 2008 Share Posted September 18, 2008 This is probably the easiest way to do this, but watch out for colors. As far as I know, the scripts produced have not yet been updated to use the new,advanced, 2008 color features. If you write the script on one machine and move it to another, it is possible that the colors will not be correct. You can manually edit the script produced to remove the color settings and then it will work fine. You can also copy and paste the code from the script into a Plug-In menu command and then add it to your workspace and add keyboard shortcuts. Pat Quote Link to comment
Taproot Posted September 18, 2008 Author Share Posted September 18, 2008 Pat, Thanks for the confirmation (and the color note), I intend to do your latter suggestion as well. Toward that end, I sought to call the Text tool as part of the script i.e. through the Custom Tool / Attribute command. This is the script that was generated: Procedure CustTool; VAR Name:STRING; Result:BOOLEAN; BEGIN PushAttrs; PenFore(1); FillBack(256); TextFont(-24192); TextSize(12); TextFace([bold]); NameClass('None'); CallTool(-200); PopAttrs; END; Run(CustTool); Indeed, at the end of the operation, the Text tool is activated, but if I click on the drawing or draw a text box with it to then apply text to the drawing, the tool drops out. Any idea why this may be happening? Is there a way to correct it? I hope to expand this concept to line styles, etc. Where does one look for a list of tool # addresses? Appreciatively, Quote Link to comment
Pat Stanford Posted September 18, 2008 Share Posted September 18, 2008 Try it like this: Procedure CustTool; VAR Name:STRING; Result:BOOLEAN; BEGIN TextFont(-24192); TextSize(12); TextFace([bold]); NameClass('None'); SetTool(-200); END; Run(CustTool); SetTool sets the tool for repeated use. CallTool gives you one operation with the tool. If you need to set the color of the text, you will need to use something like: FillFore(R,G,B); FillBack(R,G,B); PenFore(R,G,B); PenBack(R,G,B); Where the RGB values are in the range of 0 to 65,535 and set the Red, Green and Blue values. Pat Quote Link to comment
Miguel Barrera Posted September 18, 2008 Share Posted September 18, 2008 You can find the list for tool selectors in the Appendix of the Vectorscript Reference. Vectorscript Reference Quote Link to comment
Taproot Posted September 18, 2008 Author Share Posted September 18, 2008 Fabulous! "SetTool" is what I was after. I answered my own question about tool tables: Table E of the Vectorscript guide. Cheers, Quote Link to comment
Taproot Posted September 18, 2008 Author Share Posted September 18, 2008 Miguel, The electronic version is a vast improvement over what I have. Thanks, 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.