Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can`t delete TEXT STYLE

22 REPLIES 22
SOLVED
Reply
Message 1 of 23
tecotonelli
44132 Views, 22 Replies

Can`t delete TEXT STYLE

I`m working on this architecture project and copied some clean lines to the file from a landscape design project.

 

Somehow these text styles showed up to my file (more than 50 text styles from xrefs, because of their strange names, even though I don`t have any attachment).

And it says that I cannot delete them cause I`m using it. 

 

I`ve tryed out everything I could imagine and read about it. It doesn`t work.

Now this simple .dwg file is very heavy and with a lot of unwanted text styles.

Even if I try to copy just the lines to start over another file, all the text styles go together.

 

Tryed: 

 

PURGE

AUDIT

RECOVER

WBLOCK

TXTMRG (not sure how to use it)

QTEXTMODE

 

Can someone please help ?

Attached is one of the files that this happened to.

As I`m working with a few attachments this happened to all of it.

 

My default text style are "B3_1.5", "B3_2.0" and "B3_3.0". All the other are unwanted text styles.

 

22 REPLIES 22
Message 2 of 23
maxim_k
in reply to: tecotonelli

Welcome to the Autodesk Forums!

 

With lines, copied from landscape design, you bring to your drawing a lot of Proxy objects (AcDgnLS).

In order to get rid of them use -WBLOCK command with * option to save entire file to disk under another name.


(see result in attached file)

 

 

Maxim


Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.


Maxim Kanaev
Architect
MARSS

MacACAD | Linkedin

Etiquette and Ground Rules of Autodesk Community
Message 3 of 23
abubakars
in reply to: tecotonelli

See the link for another solution to delete text styles, if you need to that in batch.

Delete unknown Text styles

Message 4 of 23
rkmcswain
in reply to: tecotonelli

This doesn't fix your unpurgable textstyles, but that drawing also contains a bunch of DGN linetype garbage.

 

"DGNPURGE" 
Purged 1236 unreferenced complex linetype records (of 1236).
Purged 15876 unreferenced strokes (of 15876).
 
2060 blocks deleted.
10 linetypes deleted.
206 text styles deleted.

  

So above and beyond those textstyles, check your templates to make sure they do not contain all this DGN overhead junk, so you do not keep spreading it around.

 

 

R.K. McSwain     | CADpanacea | on twitter
Message 5 of 23
j_avila_tgt
in reply to: maxim_k

Your advise helped me sooooo much!!! I'm relieved.  I had brought in a file form an Architect with all these test styles maybe like 80.  I only draw up the pools.  So whenever I picked a text or a leader or a dimension, anything to do with text.. it would lag like around enough time for me to take another sip at my coffee and place it down.  Thanks a lot!!!

Message 6 of 23
srt_titya
in reply to: rkmcswain

Hello sir,

 

Could u tell me how to use " DGNPURGE" ?

Message 7 of 23
Alfred.NESWADBA
in reply to: srt_titya

Hi,

 

>> Could u tell me how to use " DGNPURGE" ?

What AutoCAD version do you have?

If you have AutoCAD 2015 you don't need a tool, you can use the standard command _PURGE and check the option "...purge orphaned data".

 

For earlier versions of AutoCAD see >>>this article<<< for more info about downloading it plus how-to-use.

 

HTH, - alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 8 of 23
rkmcswain
in reply to: Alfred.NESWADBA

Alfred.NESWADBA wrote:
....this article for more info ....

I like how the author more or less blames the user for the problem.... "and the original linetypes were not mapped or were incorrectly mapped to AutoCAD linetypes"...

 

The original DGNPurge that Kean posted for pre-2015 versions works well. The built-in purge in 2015 (Automatically purge orphaned data) still leaves some old DGN linetype data in the drawing on some occasions however. Repeated purges will not get rid of it.

 

R.K. McSwain     | CADpanacea | on twitter
Message 9 of 23
Alfred.NESWADBA
in reply to: rkmcswain

Hi,

 

>> The built-in purge in 2015 [...] Repeated purges will not get rid of it.

I have not seen yet that the 2015-purge doesn't get rid of such objects, but what might be necessary is to close and reopen the drawing between purge-calls.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 10 of 23
rkmcswain
in reply to: Alfred.NESWADBA

Alfred.NESWADBA wrote:

.... but what might be necessary is to close and reopen the drawing between purge-calls.

I believe you are correct on this point, which is unfortunate since the pre-2015, separate DGNPurge command worked so well. I prefer that it remove all DGN linetype data, period, without exception, like the older version did.

 

R.K. McSwain     | CADpanacea | on twitter
Message 11 of 23
JayZoop
in reply to: maxim_k

-WBLOCK worked for me.  Thanks for the advice.

 

A few side notes I incountered.

 

1.) Be sure to type -WBLOCK, not WBLOCK.

 

2.) Sometimes imbedded images and raster images might jump to the front.   Send those images to the back and save.

 

3.) It's a good idea to keep the original bad file temporary just incase of a mishap.  Then delete that file if -WBLOCK was successfull.

Message 12 of 23
JayZoop
in reply to: tecotonelli

I've had this same problem myself for a long time.   The long list of text-styles made the file sizes very large.

I found the way to delete text styles.

 

1.) in the command bar type -wblock (make sure there is a negative -)

 

2.) select the file name, hit Save

 

3.) if prompted hit "Yes" to replace file

 

4.) immediately after type  * in the command bar to save the WHOLE drawing, and hit enter.  (Typing * is very important or only parts of the drawing will be saved)

 

 

Side comments.    It wouldn't hurt to Purge the drawing as well before -wblocking.   Also if you are experimenting with -wblock, save it as a random name so you don't mess up the original file.

 

 

I hope this helps.

 

 

Message 13 of 23
JayZoop
in reply to: maxim_k

Yes sir.     It's always important to type the star (*) to for entire drawing.    If you don't, some features disappear.

Message 14 of 23
JayZoop
in reply to: Alfred.NESWADBA

For those who haven't figured it out.

 

 

1.) -wblock

2.) select file name and "yes" to override file

3.) then * for whole drawing.    The STAR is very important or portions of the drawing might not get -wblocked.

 

While experiementing with -wblock, you can save file as a different name so you don't loose original information.

Also -wblock might cause certain features like embedded images to jump to the front.    Just send those to the back.

 

Jason

Message 15 of 23
j_avila_tgt
in reply to: JayZoop

Are you talking about the (*.dwg)  this star in front of the .dwg???

Message 16 of 23
JayZoop
in reply to: j_avila_tgt

Right after you hit "Yes" to override the file name, the command bar is still active.     Simply type * then hit enter.       * is the option for Whole Drawing.

 

And just to reiterate somebodies previous comments, some features like embedded images might jump to the front.   Send those to the back.

 

Let me know if you have any issues. 

 

Jason

Message 17 of 23
juha.kujansuu
in reply to: tecotonelli

Hi,

One way the "kill" the items is to save your dwg-file to dxf. Then do the purge and save it to dwg again. 

 

- Juha

Message 18 of 23
JayZoop
in reply to: tecotonelli

I will try that at work today and let you know the results.
Message 19 of 23
matt
in reply to: rkmcswain

Yes no kidding about blaming the author. 

 

If anyone is worried about your level of experience, can't give you a max. 3 step simple key-entry solution to ANY problem, if they ask ANY questions, give you links, ask you what kind of computer your have, or use the word "registry" in any sentence, they do not know what they are talking about and are wasting everyone's time on here.  They are typically are just lonely.

 

Which in itself is no crime.

 

Autocad should have a dating site for those people.  Seriously.  Until then, they should just surf CL and not here.  Better results.

 

Matt.  

 

 

Message 20 of 23
rculp
in reply to: JayZoop

Be aware that the WBLOCK option is a nuclear option that will delete all paperspace components. Use with caution.

 

Another alternative that might preserve PS components is selecting the entire database, and then removing whats visible.

 

UNISOLATE and turn on/thaw all stuff you wish to keep.

In modelspace, enter the ERASE command

When prompted to select objects enter (ssget"X") complete with parens.  That selects the entire database, even stuff that's off or frozen or offscreen or whatever, while still be prompted to select objects enter an R for remove and remove the stuff you want to keep (with a window or crossing window).  pressing enter will erase what's left in the selection set, the beauty is it doesn't cross "space" lines, it won't muck up PS stuff.

 

Then repeat the same process in PS then purgeall

 

 

Old purgeall function:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(vl-load-com) 
(vl-load-reactors) 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun purgeall (/ $acad $doc) 
     (setq $doc (vla-get-activedocument (vlax-get-acad-object))) 
     (repeat 3 
     (vla-purgeall $doc) 
     ) 
     (vlax-release-object $doc) 
     (princ  "\n") 
     (princ) 
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun DetachUnloadedXrefs (/ tmpObj)
(vlax-for Layout (vla-get-Layouts (vla-get-activedocument (vlax-get-acad-object)))
(vlax-for i (vla-get-Block Layout)
  (if
   (and
    (= (vla-get-ObjectName i) "AcDbBlockReference")
    (vlax-property-available-p i 'Path)
    (setq tmpObj (vla-Item (vla-get-Blocks (vla-get-ActiveDocument (vlax-get-Acad-Object))) (vla-get-Name i)))
    (assoc 71 (entget (tblobjname "block" (vla-get-Name i))))
   )
   (vla-Detach tmpObj)
  )
)
)
(princ)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun c:pga ()
(setvar "cmdecho" 0) (setvar "nomutt" 1)(princ)
	(command ".undo" "BEGIN")
(princ "Purging ")
	(purgeall)
	(princ ".")
	(purgeall)
	(princ ".")
	(DetachUnloadedXrefs)
	(princ ".")
	(command-s "-scalelistedit" "r" "y" "exit")
	(princ ".")
	(command 
		"-purge" "A" "*" "n"
		"-purge" "r" "*" "n"
		"-purge" "z"		
		"-purge" "e"
		"-purge" "o"
	)
	(princ ".")
	(purgeall)
	(princ ".")
	(command ".undo" "end")
	(princ ".")
(setvar "cmdecho" 1)(setvar "nomutt" 0)(princ)
(princ ".")
	(princ "... Drawing has been purged.")
	(princ) 
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(princ "\n       |   Enter PGA to execute   |")
(princ)
But hey, that's just me.

Randall Culp
Civil-Structural Design Technician
(aka CADaver)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost