• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

agn2txt error

Horst18519

Moderator
Resource contributor
Messages
2,385
Country
germany
Arno, not sure if I'm the first to actually make use of your nice autogen tools, I sure think they will make life easier for a lot of developers.
Trying to decompile my agn files I came across an issue though. If I run agn2txt via the control panel I get the following errors: (sorry, german Windows, I try to translate the important things)

Unbehandelte Ausnahme: System.IO.FileNotFoundException: File or Assembly "Autogen, Version=1.0.0.0, culture=neutral...." or ... could not be found
ASToFRA.agn2txt.DecodeAGN(String filename)
ASToFRA.agn2txt.Main(String()args)

WRN: Protocoling of Assembly is OFF
Any ideas?
 
Hi Thorsten,

Sounds like the autogen.dll file can not be found. But it should be in the same folder as the exe.
 
Ok, if I copy the agn to the MCX folder I can drag+drop it and it seems to work. At least if I use the cmd box I see the list of rectVegetation entries on the screen (agn file consists of those only), but no txt file is created. Where is it stored? Maybe there are too many rectangles in the ann file, I use to use quite a lot of them.
 
Hi,

The tool is supposed to be in the ModelConverterX folder indeed. But your agn file can be anywhere.

Output is send to the screen by default. You can put it in a txt like this:

agn2txt myfile.agn > myfile.txt
 
Ok, that works. I tried *.agn *.txt or things like that, but now I know it's the > key, thanks!
Unfortunately it is quite a pita to write all those agn file names in the cmd line, and there seems to be no way of creating a batch job for it either. Could you implement a function that creates the txt automatically?

Sorry for bugging you, just trying to make the tool even cooler. :D

EDIT:

I just found out I can do it using this line in a batch job:

%windir%\system32\cmd.exe /K (MCXpath)\ModelConverterX_120\agn2txt.exe > .txt

But I'm not able to tell the job to rename the file to the same name as the agn file, I'm sure it's possible though, isn't it?
 
Last edited:
Hi Thorsten,

You can do a lot with batch files, but maybe I should add some gui for those less familiar with batch files.
 
Or just give a hint how to create a batch that enables drag+drop to compile to a txt file with the correct file name.
 
Ok, it worked now. I had to manually copy the file names from the original agn into the new txt files for all my files, but I was then able to replace the GUIDs and compile them back to agn files. Was a bit tricky as well as again I needed to enter the individual file names, which is always a lot of work with all those numbers (what are they good for anyway? some sort of lat/long values?).
Eventually I got the deal done and I see my new autogen in FSX - nice! :)

A simple option such as "agn2txt *.agn > *.txt" and vice versa would be great though - or just create the txt/agn files with their names if you drag+drop several files, that'd be cool.
 
Back
Top