There's more to experience when you log in!
You can use the GridMaker tool to create the index layer and then use one of these tools to do the batch printing:
Data driven pages: http://communitydownloads.pbinsight.com/code-exchange/download/data-driven-pages/
Atlas Program: http://communitydownloads.pbinsight.com/code-exchange/download/atlas-program/
Site mapper: http://communitydownloads.pbinsight.com/code-exchange/download/sitemapper-x64/
Thanks Greg, I'll check these out and let you know if it does the trick!
No Luck with any of these tools in MapInfo Pro v17 64 Bit. Seems so odd that MapInfo doesn't include this feature by default. Any Other suggestions? Perhaps @Peter Horsbøll Møller? might have some ideas?
Hi @Steven Graham (Stevie G)?
How far to you get in this process?
Did you manage to create your table of index using the GridMaker tool?
I'd think the SiteMapper x64 is you best chance of a tool for generating map series from your index table. Did it not work?
I used Sitemapper as it appeared to be the most compatible with x64 interface.
It seemed to crash the tool altogether when I ran it, please see attached screenshots of how I set it. Any guidance would be appreciated.
I had a look at the source code provided by @Kalu Ribush?.
I think I found a few issues that I have tried fixing. Can you try to copy the attached MBX into the folder where you unzipped Sitemapper and overwrite the existing MBX.
I just gave it a run on my Pro 17.0.1 nad here it does run thru a small table, zooms and pans and creates the requested PNG files.
Hi Pete, Thanks so much, I really appreciate your help.
I tried the MBX (with both mapper and layout) on a 2 cell grid (Small Grid) and got the following in the Message Window:
Logging to C:\Users\s.graham\Documents\Map Output\Map_Export_Log_20180910_0926.log
Selected Layout ID = 3026
Creating maps for 2 sites.
Error with site 1. Skipping to next site.
Upon checking the log file is presented the following:
10/09/2018 09:26:06 @-@-@-@-@-@-@-@-@
10/09/2018 09:26:08 Creating maps for 2 sites.
Seems to be still crashing the tool out completely.
I've also been looking at the MapBasic Code and considered writing an updated tool for myself and others to use. I have a secondary question regarding the GridLines feature in MapInfo Pro 17, this doesnt appear to be PolyLine based like Grid maker tool, is there any way of accessing the centroids of the Grid Regions generated by Grid Lines?
Version 1.2 mate
Oh, I need all the 4-5 files that make up a table.
v1.2 should be the right version. Weird as it worked quite well for me.
Hi Steven and Peter
I've attached an updated version of the Site Mapper tool. Hopefully this works for everyone. Thanks to Peter for some code enhancements.
I have updated the tool on Community Download.
Thanks so much Kalu and Peter! Fixed the crashing issue and it now generates the maps. I have encountered a separate issue (Not sure if its in SiteMapper or MapInfo PDF Printer) but it doesnt seem to be printing the street name labels to the output PDF, any ideas on this? (see attached screenshot)
Just tried export to PNG format and no Labels appear either, Any ideas @Kalu Ribush? ?
It might be that the map is still being rendered when the Print statement is sent.
I have tried adding a Sleep statement before any of the output is being generated. It's using the wait time setting from the dialog so you can can try to change that from 1 to 3 seconds to see if that make a difference.
I have attached a modified version of the MBX, v1.2.1
I'm aware of some other colleagues who used the tool reporting a similar issue. I never had time to investigate further. In the instances I've used the tool, I didn't have label layers.
I suspect Peter's idea above is the cause. Hopefully his modification to add a delay will help. If not, I'm not sure what else could be causing the problem. You may need to look at creating a text layer with the labels first and adding it to the maps.
Alternatively, run the tool to generate all the maps without closing the Layout windows. They if you know a bit of mapbasic you could batch print all the open Layout Windows.
I'm about to go on two weeks leave, so won't be able to respond further until I return.
Thanks @Peter Horsbøll Møller? I tried this and it still didn't generate the labels, what line did you add the sleep to? I may have to play with this to get it refined. Is there any way of detecting if labels have rendered before printing?
@Kalu Ribush? Thanks mate, I'll look at what Peter has suggested and see what I can work out. I'll update you on my findings.
Thanks to you both for helping me with this, it is greatly appreciated!
I added the Sleep command to line 1371.
Just asking the obvious: it's not a zoom layering issue that is preventing the labels from being rendered?
No, this was my initial thinking. There are no display overrides or anything in place. Kelu mentioned that he was aware of some other colleagues who used the tool reporting a similar issue with the labels not rendering. Trying to work out why this may be, I've tried sleeping and playing with the map redraw, I'm hoping to get this worked out. If you have any other ideas however, let me know.
I assume you have tried to run the Update Window window_id statement to force a refresh of the map before printing it.
Have you tried only printing a table with a single record and via the source code disable the closing of the table and map? Do the labels display in this map?
I'm back from leave. How are you going with the updated tool? Have you found a solution to getting the labels to print?
@Peter Horsbøll Møller? Sorry for my late reply, I have been sidelined with other tasks. I did try the window refresh but still didn't output the labels. I have not yet tried to print only a single record, this maybe something I will endeavor to do to try and narrow down the cause.
@Kalu Ribush? Still haven't found why the labels aren't printing to PDF, it looks like the layer is there in the PDF but they didn't render. Perhaps pausing/refreshing prior to the print being rendered might help? Any suggestions would be appreciated, this is a fantastic tool you have created for Atlas style maps and a few more fixes to iron out the label issue and it would be even more amazing.
I really appreciate help from both yourself and Peter on this. This tool is an extremely useful tool for Government and councils for printing Map Series. An Addition of Index feature would be the icing on the cake.Looking forward to hearing your suggestions
I've spent a couple of hours trying to work out what's going on and why the labels don't print.
I have replicated the issue, but I'm not sure what's causing it.
I note that when using a Mapper window as the template instead of a Layout window with mapper frame, then the label do print.
I've also found that when I write a simple MBX to clone a Layout frontwindow() and then print the cloned window to a PDF, the labels also do print.
I also tested adding a sleep delay just before printing the PDF, but this does not appear to help.
I did find that if I add a command to open an OK prompt (Note "OK") just before the command to print the PDF, about line 1410, then the labels do print to the PDF after the user has clicked OK.
I can do some further testing, but I'm almost out of ideas.
Thanks for the feedback Kalu, I appreciate your help and was happy that you could reproduce the bug on your end. I'll do some testing based on your findings and see if I can get it working with the labels.
I initially thought it was a issue with MapInfo PDF Printer but some testing with regular prints seemed to work. I also tested Map vs Layout and I had some hit and miss results with this too mate. I'll see what else I can find out, you have created an awesome tool here and I want to try get it working fully as its usefulness is diverse and highly sought after for Atlas/Site Mapping.
@Kalu Ribush? I was able to get the labels to print using the note "OK" command right before it prints the layout. I also tried the sleep command but that seemed to fail. very intriguing. @Peter Horsbøll Møller? I have a feeling the sleep command maybe stopping the labels from rendering, is there another sleep method that may be non locking?
I just noticed that Kalu wrote the problem only occurs with a map embedded in a layout. Are you seeing the same, Steven?
If so, one thing worth trying is to make the map in layout the active window and then switch back to the layout as the active window again. That might force a redraw of the map and so the labels.
I think we've added the code to the tool to do this:
? set window intMapperFrameID front
set window intCurrentLayoutID front
This didn't seem to help.
Yes I am seeing what Kalu has reproduced on his end. Seems to happen in layouts, I'll investigate further.