Jump to content

VW12.5 how to select text


kdo

Recommended Posts

dear all,

is it possible to search and select all text boxes based on a specific string of text or word in VW12.5.3

for example select all same markers (text fields containing B2) on a survey for further editing.

kind regards,

ds.

Edited by kdo
Link to comment

pat,

thanks for getting back - unfortunately find and replace text does only replace text not select it... we are trying to separate out specific text (all on same class!) from a consultants drawing.

thought about vectorscript, but since i have never used it before i am wondering if it is worth the effort.

is it difficult to do and is there any good training material available?

ds.

Link to comment

kdo, if you haven't done so already you might try "custom select" and set object type to "text" and class to the class in which the text resides. This will of course select every instance of text in that class, so you might need to de-select some text blocks manually. I am unsure of how many text blocks we are talking about here. Dozens? Hundreds? More?

Link to comment

I hope this is what you need.

PROCEDURE SelStrInText;
VAR
searchStr: STRING;

PROCEDURE ProcessTextObj(txtHdl: HANDLE);
VAR
	layHdl: HANDLE;
	layName: STRING;
	curText: DYNARRAY[] of CHAR;
BEGIN
curText:= GetText(txtHdl);
UprString(curText); {REMOVE THIS LINE IF YOU NEED TO MATCH TEXT CASE}
IF Pos(searchStr,curText) > 0 THEN
	BEGIN
	SetSelect(txtHdl);
	{NEXT 3 LINES REPORT TEXT FOUND TO Output.txt IN USER'S DIRECTORY}
	layHdl:= GetLayer(txtHdl);
	layName:= GetLName(layHdl);
	WriteLn(layName,': ',GetText(txtHdl));
	END;
END;
BEGIN
searchStr:= StrDialog('Enter text to search','');
IF NOT DidCancel THEN
BEGIN
DSelectAll;
UprString(searchStr); {REMOVE THIS LINE IF YOU NEED TO MATCH TEXT CASE}
ForEachObject(ProcessTextObj,(INVIEWPORT & (T=TEXT)));
END;
END;
Run(SelStrInText);

  • Like 2
Link to comment
  • 8 years later...
  • 2 years later...

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