General CADD Pro Free Help Forum

Free Support for All Interested in General Cadd Pro

The New Generic CADD for Windows

 
Page 1 of 1 1
Topic Options
#6284 - 02/26/06 08:24 AM Remove Empty Text
Vincent Offline
Member


Registered: 06/25/02
Posts: 505
Loc: Newcastle, Australia
I just uploaded the RemoveEmptyTextObjects.gxm .

Modelled on DK it will create a selection set of text objects that have either no text in them or are made up of only spaces and/or carriage returns.
It has a nice progress routine. It looks like the time I spent on the stop watch macro has really paid off.
It's ideal for cleaning up converted GC6 drawings.

Many thanks to Matt and Tom for the inspiration and beta testing.

Vincent

Top
#6285 - 02/26/06 04:08 PM Re: Remove Empty Text
Noel H. Browning Offline
Member


Registered: 12/11/01
Posts: 862
Loc: Glendale, CA
Vincent,

Good job!
I remember how hard it was to remove all those empty text object from DWG files imported into GC6.

Noel Browning \:D

Top
#6286 - 02/27/06 09:00 AM Re: Remove Empty Text
Tom Albright Offline
Member


Registered: 12/11/01
Posts: 833
Loc: Montana
And many thanks to you Vincent,
_________________________
Tom

Top
#6287 - 02/27/06 10:28 AM Re: Remove Empty Text
Matt Administrator Offline
Member


Registered: 03/28/02
Posts: 3975
Loc: Spokane, WA
Nice job Vincent. I appreciate you responsiveness on this one.

This macro is a real gem. Even if you don't need empty text removed, it can be used as a template for other macros. Great stucture.

Matt

Top
#6288 - 02/27/06 09:33 PM Re: Remove Empty Text
Bjorn Holmgren Moderator Offline
Member


Registered: 12/12/01
Posts: 2586
Loc: Sydney Australia
Vincent,

You don't need any applause from me, you know that you can write macros :p .

Matt, was it a year ago or further back that you introduced the TAB identifier? I can't find it easily now. Was it $TAB or /TAB? It never went into the Help File. /LIST & $LIST should also go in.

That might augment the value of Vincents macro if it could also search for possible TAB text lines.

Bjorn

Top
#6289 - 02/27/06 10:43 PM Re: Remove Empty Text
Matt Administrator Offline
Member


Registered: 03/28/02
Posts: 3975
Loc: Spokane, WA
Bjorn,

I had to check the code I forgotten too. Carl put it in.

TAB = %%TAB%%
Carriage Return = %%CR%%
Newline = %%NL%%

I don't have an example, do you remember how to use it?

Matt

Top
#6290 - 02/28/06 12:25 AM Re: Remove Empty Text
Bjorn Holmgren Moderator Offline
Member


Registered: 12/12/01
Posts: 2586
Loc: Sydney Australia
Matt,

I know I tested it, must have stayed in GG only.

This works, into and out of a text line:

/STR,C,TAB,%%TAB%%,END,%%CR%%,NEXT,%%TAB%%,LINE,#;
TL,@,$STR,#;
/VST,1,%%TAB%%;
/VST,2,%%CR%%;
/VIN,1,1;
/LST;
/EEX,1,V,8,A,/VST,0,$STR;
/STR,L,$S(0),/VIN,0,$VAL;
.LOOP;
/IF,$I(1)[GT]$I(0),/GTO,EXIT;
/STR,S,$S(0),1,$I(1);
/IF,$STR[EQ]$S(1),/BEEP;
/IF,$STR[EQ]$S(2),/BEEP;
/VIN,1,$I(1)+1,/GTO,LOOP;
.EXIT;

Note, that $I(0)=17 !
The carriage return %%CR%% counts as one chracter in a multiline text line.
Try it on Step in GG.

Bjorn

Top
#6291 - 02/28/06 12:36 AM Re: Remove Empty Text
Bjorn Holmgren Moderator Offline
Member


Registered: 12/12/01
Posts: 2586
Loc: Sydney Australia
Matt,

These TAB-only text lines don't show a PR reference point and cannot be snapped to if there is another object in the drawing. They do select with a Window Selection.

Should they not show up with a PR and snap if they are there?

The space-only text lines do and do.

Bjorn :rolleyes:

Top
#6292 - 02/28/06 09:35 AM Re: Remove Empty Text
Matt Administrator Offline
Member


Registered: 03/28/02
Posts: 3975
Loc: Spokane, WA
It should show a PR point and the ref point should be snappable. I'll fix it.

Thank,
Matt

Top
#6293 - 03/04/06 03:58 AM Re: Remove Empty Text
Vincent Offline
Member


Registered: 06/25/02
Posts: 505
Loc: Newcastle, Australia
I've added the following to my macro.

/VST,4,%%TAB%%; $S(4) = TAB character
/VST,5,; $S(5) = Ctrl+Backspace character

RemoveEmptyTextObjects-Rev-A.gxm

I wonder how many more non printable characters there are.

Bjorn, I didn't experience the trouble you had with the PR or snapping to the %%TAB%% text line.

Vincent

Top
#6294 - 03/06/06 07:15 PM Re: Remove Empty Text
Bjorn Holmgren Moderator Offline
Member


Registered: 12/12/01
Posts: 2586
Loc: Sydney Australia
Vincent,

What's Ctrl/Backspace used for ?
Looks like a small space.

Something funny about the TAB-only TL:


The red column is TAB-only.
For each RD it adds a couple to the column.
Not visible in all zooms.

Bjorn

Top
#6295 - 03/07/06 02:51 AM Re: Remove Empty Text
Vincent Offline
Member


Registered: 06/25/02
Posts: 505
Loc: Newcastle, Australia
Bjorn,

I've no idea what Ctrl+Backspace is used for but it is one of those characters that can create an empty text line so I've included it.

With regards to the TAB only text it looks like a bug to me. I get it when I use the scroll zoom.

Vincent

Top
#6296 - 03/07/06 10:24 AM Re: Remove Empty Text
Kurthsurvey Offline
Member


Registered: 01/27/06
Posts: 658
Loc: Columbia Heights, Minnesota
Bjorn

CTRL+BACKSPACE was used in GC to erase the whole line of text and start over. Now I believe you have to type CTRL+HOME then type CTRL+DELETE to do the same function. But don't quote me on that.

Tony
_________________________
Tony

Top
#6297 - 03/07/06 07:14 PM Re: Remove Empty Text
Bjorn Holmgren Moderator Offline
Member


Registered: 12/12/01
Posts: 2586
Loc: Sydney Australia
Tony,

Yes GC allowed that like Word and WordPad do in Windows. It's an editing keycomb that should not produce a character.

In Notepad however a character is inserted (W98SE). Same for GCP editing windows.

Does Windows control that or can it be changed in GCP?

Bjorn

Top
#6298 - 03/08/06 12:35 AM Re: Remove Empty Text
GCP Support Administrator Online   content
Member


Registered: 12/17/01
Posts: 3345
Loc: Cherry Valley, N. Y.
I find that in the TE edit box, Ctrl + BACKSPACE inserts a  character. Same in Notepad

In WordPad and MS Word, Ctrl + BACKSPACE erases the last word rather than the whole line

I find that in the TE edit box, Ctrl + DEL erases the whole line when the cursor is at the beginning of a text line. Same in Notepad

In WordPad and MS Word, Ctrl + DEL erases the next word folowing the cursor.

FYI, The edit box in the TE command is a Windows control and the way it reacts to keyboard commands is determined by Windows conventions and is not something that the GCP programmers have intentionally or unintentionally caused to happen.

It appears that Windows programs differ in the use of these 2 key combinations.

BTW, the  is an ALT + 0127. Notepad, the TE edit box and MS Word will display ALT + 0127 but Wordpad will not! The message box in this forum will not accept ALT + 0127 but I can paste the character in! Figure that one out!

A few years ago I wrote a utility that helps visualize the variations between the ALT + 3 digit extended characters and the ALT + 0 + 3 digit characters. You can download it here if you like. http://www.generalcadd.com/fontest/Fontest.zip Sometimes it is fun to play with. In this case, I notice that the Windows Character Map in Win XP does not show that ALT + 0127 exists but Fontest does show it. Interesting....

Top
#6299 - 03/08/06 02:30 AM Re: Remove Empty Text
Sean Offline
Member


Registered: 01/06/02
Posts: 1049
Loc: Whistler, Canada
Jim,

On my machine, running win'98se, the extracted fontest.exe file brings up an 'unexpected error' warning then shuts down.

Sean

Top
#6300 - 03/08/06 08:14 AM Re: Remove Empty Text
GCP Support Administrator Online   content
Member


Registered: 12/17/01
Posts: 3345
Loc: Cherry Valley, N. Y.
Reboot and try it again?
Top
#6301 - 03/08/06 04:26 PM Re: Remove Empty Text
Sean Offline
Member


Registered: 01/06/02
Posts: 1049
Loc: Whistler, Canada
That did it Jim.

It appears that my computer is beginning to have stability problems...again.

The fontest is a handy little program.
Is there any way to display it full screen so it is easier to read?

The only size controls I found were default (about 1/2 screen) and very magnified though still only 1/2 screen.

Sean

Top
#6302 - 03/08/06 06:33 PM Re: Remove Empty Text
GCP Support Administrator Online   content
Member


Registered: 12/17/01
Posts: 3345
Loc: Cherry Valley, N. Y.
Sorry, Sean. I wrote it as a fixed size rather than deal with all the resizing of all the controls that would be necessary to do as you wish. It would take a major re-write.

BTW, what you are running into with Win 98 is why I now run Win XP. In my experience, a Win 98 machine needs to be rebooted once or twice a day.

Top
#6303 - 03/08/06 11:09 PM Re: Remove Empty Text
Sean Offline
Member


Registered: 01/06/02
Posts: 1049
Loc: Whistler, Canada
Quite often it's more than twice a day.

But the Win XP interface makes me gag.
Even when it looks the same, it won't let me in to tweak things. It's like trying to chisel a shape in a soft marshmallow.

I stayed in DOS and Win 3.1 as long as possible, moved grudgingly to win'95 and was finally forced into win'98 by USB dependant devices.
I expect I'll be on XP eventually ... then feel the same about whatever OS is next in line.

Sean

Top
#6304 - 03/09/06 02:03 AM Re: Remove Empty Text
GCP Support Administrator Online   content
Member


Registered: 12/17/01
Posts: 3345
Loc: Cherry Valley, N. Y.
tweak what kind of things?
Top
#6305 - 03/09/06 03:31 AM Re: Remove Empty Text
Sean Offline
Member


Registered: 01/06/02
Posts: 1049
Loc: Whistler, Canada
All the things in there I screw up in the normal day to day... \:D
Top
Page 1 of 1 1


Moderator:  Bjorn Holmgren 
Hop to:
Search
Who's Online
0 registered and 5 anonymous users online.
Newest Members
Gen, vjs.314, jhindmand28, Kenneth Reece, heleana
1460 Registered Users
Forum Stats
1460 Members
24 Forums
3127 Topics
22833 Posts

Max Online: 46 @ 09/08/07 06:17 AM
July
Su M Tu W Th F Sa
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31

Generated in 0.054 seconds in which 0.042 seconds were spent on a total of 13 queries. Zlib compression enabled in php.ini