Here is a little c# application which deletes TB2 entities from a drawing.
We have one project where TB2 saves drawings containing TB2 entities. Moving to Map we need to remove these entities but keep all non-TB2 drawing objects.
The application:
- checks whether a drawing entity has XDATA or not, if there is any XDATA the app checks whether XDATA contains the string "FID:", if so, the object gets deleted
- purges all layers
- creates one new layer (fixed name)
- removes non-TB2 objects on one specific layer (fixed name)
- creates a log file and lists all drawings which could not be processed
The app runs within AutoCAD, you only need to specify the folder where the files are stored (netload, command: win_deletetb2entities).
Source code is attached as well. Maybe it is useful for someone else.
https://drive.google.com/file/d/0B-MpwgWFuw57aV9IMTViYXdkM0E/edit?usp=sharing
AutoCAD Map 2013, SP2
No comments:
Post a Comment