Jump to content
slovenc0417

Cannot Purge Linetypes

Recommended Posts

slovenc0417

My title is somewhat misleading. I can actually purge these hidden line types, but I was wondering if anyone has a better method.

 

The line types in question are funky looking line types that do not exist within our office. They often contain "$$" and and/or file names and other odd characters as if they are remnants of binding a drawing. In any case, they are not visible anywhere in the drawing. We refer to these drawings as being "infected".

 

If any object, i.e. block, text or even a simple line, is copied from an infected drawing into an uninfected drawing, all of the mysterious line types follow. And when I say all, I mean 50+. Furthermore, copying from one infected to another infected will double the line types. So, as you can see, if undetected, you could easily have 100's of "line types" on a drawing which substantially increases the size of the .dwg file.

 

The process that I have created (from researching on the internet) is to save the .dwg into a .dxf. Close the .dxf and then PURGE. Purging the .dwg will not work. And, you MUST close and re-open the created .dxf in order to purge these files. The you can again save as a .dwg. To complicate things, occasionally a .dwg will not save as a .dxf unless I AUDIT it first.

 

Needless to say, this is a giant pain in that the files that are infected are at least 50 in number. I have created a macro or two to at least reduce some of the steps. Unfortunately, since the .dxf must be closed and re-opened (which cannot be done in a macro) an all encompassing macro cannot be written.

 

My process is alright in that once you get the hang of it it goes fairly smoothly. I was hoping, however, that someone might have a better solution.

 

Thanks!

Share this post


Link to post
Share on other sites
ReMark

Maybe SuperPurge?

Share this post


Link to post
Share on other sites
slovenc0417

I have tried that, but it does not work. Thanks though.

Share this post


Link to post
Share on other sites
bennyboy86

have you isolated those layers to make sure not in drawing? you will be suprised if you isolate and select all will find dots. delete then re purge also they could be hiding in blocks or text styles, not sure what you have tried. hope that helps.

Share this post


Link to post
Share on other sites
BIGAL

Maybe run a simple lisp create a selection set using the linetype as the only filter and see how many objects exist. As first step

 

(setq ss (ssget "X" (list (cons dxf "yourlinetype")))) ; change dxf to correct number can't remember number
(princ (sslength ss)) ; how many objects
; here do a foreach and maybe print object type, assoc 2

Share this post


Link to post
Share on other sites
slovenc0417

Good thought, but I already went that route. I even exploded the entire drawing thinking that it was hidden in a block, but had no luck.

Share this post


Link to post
Share on other sites
slovenc0417

I will have to learn a little bit about lisps. I have started to, but do you have a good online resource that will explain the ins and outs of lisps and scripts. I have looked at Lee Mac's website and that was a good start.

Share this post


Link to post
Share on other sites
ReMark

Can you post a sample drawing file that contains one of these linetypes? The drawing can be a single object (a circle for example) just as long as one of the mystery linetypes comes along for the ride.

Share this post


Link to post
Share on other sites
slovenc0417
Can you post a sample drawing file that contains one of these linetypes? The drawing can be a single object (a circle for example) just as long as one of the mystery linetypes comes along for the ride.

 

One of the issues with this linetype problem is that the file size is enormous, usually 3MB, so I can not attach a file.

 

The attached file will show an example of the type of linetypes I am talking about.

 

Note, in order for me show you this, I have gone through the DXF and purge process in order to get the file size under 1MB. I then saved as a .dwg. Normally I would purge everything and all of the miscellaneous linetypes would be eliminated. For the purposes of showing you the linetypes in question, I purged about 50% of the linetypes. Interestingly enough, after I saved back from .dxf to .dwg the linetypes are "purge-able". Keep in mind though, this is not the case with the original .dwg file.

 

Also, a point I may have not mentioned in earlier posts. When I am purging the .dxf, I often purge hundreds of blocks as well. They are typically named something like this... "*A3020304895", etc.

Sample.dwg

Share this post


Link to post
Share on other sites
ReMark

I see no other method for cleaning the drawing of the unwanted linetypes other than the one you are currently using.

Sample[ReMark].dwg

Share this post


Link to post
Share on other sites
ReMark

I changed my mind. I was able to purge all the unwanted linetypes using the following method:

 

1) -PURGE and purge Regapps first. This resulted in 2043 registered applications being purged.

 

2) Repeat -PURGE but this time select LTypes. This resulted in 2037 linetypes being purged.

 

3) Repeat -PURGE and use the All option.

 

4) Run Audit and fix errors.

 

5) Zoom > Extents.

 

6) Save

 

The process can be automated by running it via a script to batch process all the drawings you are having a problem with.

Share this post


Link to post
Share on other sites
slovenc0417
I see no other method for cleaning the drawing of the unwanted linetypes other than the one you are currently using.

 

Based on scouring the web, I figured that would be the case. Thanks for your help.

Share this post


Link to post
Share on other sites
slovenc0417
I changed my mind. I was able to purge all the unwanted linetypes using the following method:

 

1) -PURGE and purge Regapps first. This resulted in 2043 registered applications being purged.

 

2) Repeat -PURGE but this time select LTypes. This resulted in 2037 linetypes being purged.

 

3) Repeat -PURGE and use the All option.

 

4) Run Audit and fix errors.

 

5) Zoom > Extents.

 

6) Save

 

The process can be automated by running it via a script to batch process all the drawings you are having a problem with.

 

 

Unfortunately this method will not work. The original file (not what was attached) could not be emailed due to its size (over 3MB). The file that was attached was sent just to give an idea of the type of linetypes in question. In order to shrink that file, I DFX'd it, purged hundreds of "linetypes", yet left some as an example, and then re-saved as a .dwg.

 

I was hoping that by re-saving the file as a .dwg would show everyone that these linetypes are un-purgeable when the file is in the .dwg format. Unfortunately for the purposes of this exercise, once the file is initially DXF'd the linetypes in question become purgeable in either format. The only true way for you to see the situation is to get an originally infected file. But again, the file size limitation of 1MB prevents me from posting it on this forum.

 

Finally, forgive me for repeating myself. The process I run could be scripted if it were not for the fact that once the .dwg in converted to .dxf, that .dxf must be closed and re-opened. The linetypes will not purge unless that is done.

 

I have tried many different methods mostly by trial and error. I have audited, etc. etc.

 

 

EDIT: Just realized that my profile needs updating. I am running Mechanical 2013.

Share this post


Link to post
Share on other sites
ReMark

What do you mean by opening and closing the DXF file? Are you not using the DXFIN and DXFOUT commands?

Share this post


Link to post
Share on other sites
slovenc0417
What do you mean by opening and closing the DXF file? Are you not using the DXFIN and DXFOUT commands?

 

Process to clean ONE "infected file"

I DXFOUT to create the .dxf file in the same folder that the .dwg is in. I then open the .dxf file through Windows Explorer and continue with the purge process. I choose to double-click on the .dxf through WE because I have two monitors and that folder is displayed. I prefer that to navigating through AutoCad to open the file or typing DXFIN (which I did not know about DXFIN until you mentioned it in your last post).

 

Process to clean MULTIPLE" infected file"

At times I have over 70 files to clean. When doing so, I open 15 files at once. I configure my "save as" to .dxf. I then CTRL+TAB through each drawing saving as I go, thus creating 15 .dxf files. Now I have 30 files open (15 .dwg and 15 .dxf).

 

I close everything without saving. The .dwg's do not have to be saved although I am prompted to do so I guess because of the saving as a .dxf file. The .dxf files do not have to be saved because they were just created.

 

I then open the 15 .dxf's and proceed with the purging process. For the purposes of somewhat streamlining this process, I changed my PURGE icon to purge, purge all, and added the save function. I now have 15 purged and clean .dwg files.

Share this post


Link to post
Share on other sites
eldon

Did you try Wblock, and selecting the objects? That seems to get rid of a lot of garbage.

Share this post


Link to post
Share on other sites
slovenc0417
Did you try Wblock, and selecting the objects? That seems to get rid of a lot of garbage.

 

Are you suggesting to wblock the entire drawing and then open that wblock? If so, does not do the trick. If you mean something else, please elaborate. Keep in mind though that I would like a process that will allow me to write a script for it.

Share this post


Link to post
Share on other sites
eldon

Unfortunately, without the original drawing, all we can do is to suggest likely, or unlikely procedures for you to check. :cry:

Share this post


Link to post
Share on other sites
ReMark

I then open the .dxf file through Windows Explorer and continue with the purge process.

I see no reason for this step.

Share this post


Link to post
Share on other sites
cadvision

have you tried wblocking the file?

 

The naming looks to be from some 3rd party software or maybe the original was not in AutoCAD.

 

Can give you access to a dropbox folder if you want to post full drawing

Share this post


Link to post
Share on other sites

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.   Paste as plain text instead

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