Repair Corrupt DGN with EDG in Microstation

| | Comments (2) | TrackBacks (0)

SELECTservices Online-- MicroStation EdG FAQ #6119

Work like a charm!

How do I repair/replace a missing Design File Header?

Answer: The "Not a Design File" error that occurs when opening corrupted files in MicroStation is a result of the Vital Type 9, Design File Header being lost and/or corrupt.

Follow these steps in order:

1. Create a good file using the same settings as the file that has gone bad. The preferred method is to copy the original seed file to a new file named GOOD.DGN.
2. It is recommended that you copy both the bad and good files into the EdG directory (the default is \win32app\ustation\EdG or \Bentley\program\EdG). This will save the trouble of entering path statements.
3. Backup the bad design file. There is no undo function in EdG.
4. Change to the EdG directory.
5. At the command prompt, enter the following commands:

edg good.dgn (Enter the EdG environment with the good file)
open new.dgn (Create a new output within EdG)
edg bad.dgn (Open the damaged file; substitute the name of your corrupted file)
patch wtf (Enter the patch facility of EdG)
0 (Zero sets the Words-to-Follow value to zero)
a 5 (Instruct EdG to search and not stop until 5 valid elements are found)
save (Exit the patch facility and save the patched element)
type next (Move one element further into the design)
write rest (Write all elements into NEW.DGN)
close (Close NEW.DGN)
exit (Exit EdG)

The file NEW.DGN will be your new, good file.

I did it like this:
C:\>cd C:\Bentley\Program\EDG

C:\Bentley\Program\EDG>edg c:\documentum\checkout\file1.dgn
Edit Graphics -- version 07.01.04.10 Windows x86
3D Design file

1 (9) DESIGN File Header 3D Level = 8
EdG> open c:\new.dgn
Created Output file
EdG> edg c:\documentum\checkout\file2.dgn
3D Design file

EdG> patch wtf
WTF = 766
Patch WTF> 0
DGN-E-DGNHDRLEN: Design file header length is incorrect: must be 766
WTF = 0
2 (8) DIGITIZER SETUP Level = 1
3 (0) invalid Level = 0
4 (0) invalid Level = 0
Patch WTF> a 5
WTF = 766
2 (8) DIGITIZER SETUP Level = 1
3 (10) LEVEL SYMBOLOGY Level = 0
4 (5) font lib. DATA Level = 2
Patch WTF> save

Total of 1 element patched
EdG> type next
2 (8) DIGITIZER SETUP Level = 1
EdG> write rest
3417 << END OF DESIGN >>

Total of 3415 elements written

EdG> close
EdG> exit

C:\Bentley\Program\EDG>

File is repaired!

0 TrackBacks

Listed below are links to blogs that reference this entry: Repair Corrupt DGN with EDG in Microstation.

TrackBack URL for this entry: http://kennethhunt.com/mt/mt-tb.cgi/659

2 Comments

Kenneth said:

Move the monitor to a working machine, still getting the error? Than it's a bad monitor. Move a working monitor to this machine, does it work?
If no, is the error only in Microstation? Or at the Operating System level?

Reply with details on the computer, monitor, specifically the manufacturer of each.

Do you have more than one video card. e.g. multi-headed cad?

Larry Guerrero said:

We have an older version of Microstation 95 and I am getting an error message on our monitor stating the following "Please check the signal cable"... The connections are tight and secure and we have rebooted multiple times and still get the message even by utilizing a diffrent monitor. Can you suggest something to be done.

About this Entry

This page contains a single entry by klsh published on February 26, 2003 12:19 PM.

DC to DC ATX Power Supply was the previous entry in this blog.

Butterfly Grid Will Support Massive Numbers of Video Gamers Online is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.