Jump to content
  • 0

text class


FRED JOHNSON

Question

2 answers to this question

Recommended Posts

  • 0

Fred,

Although the feature you want does not yet exist, you can get all your text into a class (or classes) with a script. I wrote a quick and dirty one to put all text objects in a document into a class. As written, it puts every text object in a drawing into the same class. You can modify the function 'SetClassOfTextObjs' to assign diffferent classes based on text attributes, or only modify text that is in the NONE class. I leave that up to you (or if you need help, just ask).

HTH,

Raymond

code:

procedure SetTextClass;

{ Author : R. Mullin }

{ Date : 4 December 2003 }

{ Assign a class to all Text objects in the drawing. }

CONST

TextClassName = 'TxtClass'; { assign your class name here }

TextType = 10;

function SetClassOfTextObjs(H:Handle):Boolean;

Begin

if (GetType(H)=TextType) then

SetClass(H, TextClassName);

End; { SetClassOfTextObjs }

BEGIN

ForEachObjectInList(SetClassOfTextObjs, 0, 2, FSymDef); { Text in symbols }

ForEachObjectInLayer(SetClassOfTextObjs, 0, 2, 1); { All placed text objs, Deep, All layers }

SysBeep;

END; { SetTextClass }

Run(SetTextClass);
[/code]

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
Answer this question...

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