Does anybody know format of .dat file to help with bookmark automation?
-
1I saved a bookmark from ArcMap 10.2.2 as ".dat and the format looks binary so I think ArcObjects may be needed to make sense of it.– PolyGeo ♦Commented Aug 5, 2014 at 7:40
-
1Thanks! This is exactly what i did as well, that's why a question. I should off expand it. At what position is number of bookmarks stored? What is a length of record in bytes? Where inside the record is name, extent's corners etc. This is what format stands for, isn't it? I thought it was obvious, obviously i was wrong about it. Happy down- voting– FelixIPCommented Aug 5, 2014 at 10:30
1 Answer
I agree with @PolyGeo you will need ArcObjects to process the BookMarks. In fact it is not a straight forward just get the extent coordinates as there are 2 types of Bookmarks and you would deal with them differently: AOI and Feature bookmarks.
In fact if anyone can prove me wrong I don't think there is even an Interface that allows you to connect to an ArcGIS Place File (.dat) and read/write directly from it? Nor does it seem you are able to load existing Place Files into a Map Document. I think it's one of those weird situations where there is a dialog exposed by the ArcMap application but there is no way to hook into it.
-
You can load "My Places" into an existing map document going back to at least 10.0. You just need to enable the "Data Frame Tools" toolbar, click the "My Places" flag, and then press the "Load" button from the dialog. See Using My Places in the online help. Commented Aug 5, 2014 at 17:32
-
2:) My mistake, I should have been clearer, when I said interface I did not mean a dialog as you described, I meant an ArcObjects Interface. There seems to be no way (that I can find) to code a connection to a DAT file and load in Bookmarks?– HornbyddCommented Aug 5, 2014 at 21:37
-
To load an existing bookmarks (*.dat) file into ArcMap you can use, Bookmarks | Manage Bookmarks and then the Load button on the Bookmarks Manager. I just tested this at 10.2.2 but I think that has been there since about 10.0. I think there was only a brief window during 9.x where My Places had some functionality not in Bookmarks, and I now recommend using only Bookmarks which are more accessible and just as functional. cc @RyanDalton– PolyGeo ♦Commented Aug 5, 2014 at 21:37