Jump to content
kdo

VW12.5 how to select text

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

Share this post


Link to post

Not by default. You could write a Vectorscript that would select all text blocks that have a given bit of text.

Could you use Find-Replace Text to do what you want? I think that was available in VW12.5.

Share this post


Link to post

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.

Share this post


Link to post

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?

Share this post


Link to post

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 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×