Jump to content

Text Styles


Taproot

Recommended Posts

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?

Link to comment

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

Link to comment

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,

Link to comment

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

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.

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