Create Snapshots from Bookmarks with Javascript (Debugged)
On April 19th, 2017, Matt Wunch published a quick script to generate snapshots of every bookmark in this AUGI article: https://www.augi.com/articles/detail/tips-for-increasing-efficiency
First of all, thanks Matt. I was looking for this exact same thing.
There were a couple of bugs that made it fail to run, however. I took the liberty of fixing the bugs and reformatting it a little bit.
Well, here is the working version of the code:
Notes
- Make sure that the filePath specified exists or Infraworks will freeze.
- Make sure that bookmark names do not use spaces or special characters (except underscore). Use a variable safe name like camelCase or Underscore_Word_Separation.
Again, a big thank you to Matt Wunch for the original code. I knew enough to debug the code but I wouldn't have been able to write it from scratch since I havn't dived into the Infraworks javascript functions or variables yet.
Hope that helps!
Looks like there was still a minor bug that made it take the same snapshot over and over in different names. It is now fixed.
ReplyDelete