Export separate sheets

Hi!
Does a Macro or XP exist, that automates the export of all sheets of a map into separate bitmap files?
This would be perfect for further editing in PS or Gimp.
It's quite annoying to always export them manually if i just want to check intermediate workresults
in another application

Comments

  • Being new to this stuff, the first thing to my mind is why would you export separate sheets to edit in PS? Thanks in advance for an explanation.
    JSM
  • Because then i could apply different effects and filters to different layers.
    I.e. I could just duplicate the rivers without their outline, give the topmost-layer a slightly transparent shine.
    Or duplicate the treesymbol (black&white) layer, give it another color and a little offset and a motion blur...
    Compared to the CC3 effects you have endless options.
    At the moment I am working on something that should look like ink on parchment...
    x1.png 490.5K
  • You can apply different effects to different sheets, not layers.
    ScottA
  • I think the point is that Photoshop/Gimp offer even more possibilities than CC3, but then you'd really need to have the sheets from CC3 on different layers in PS/Gimp. I guess he did not talk about the layers in CC3.

    Nils

    Btw, the map looks cool on the parchment background!
  • Yes exactly Nils. I use the effects in CC3 if they fit. but some stuff is not possible. always makes sense to pimp it up later.
    What i do at the moment is: Hide all except Sheet1, export, hide all except Sheet2, export with other name...
    Then import them all into i.e. one Gimp project, use Layer->Color 2 Transparency on all of them separately...
  • Thanks for the explanation. I guess I was already doing that sort of. I put my finished maps into PS and add things there as I see fit but never considered the layers aspect of it all. Very cool idea.
    JSM
  • Hm, according to the Tome there is a Hide Sheet command, which can be used within a Macro. However, that seems to work only with the name of the sheet, so you'd have to program into the Macro manually and can't use a simple loop. Also, the export as a bitmap file seems not to be available as a Macro command.

    Nils
  • Open the sheet dialogue. Select the sheet you want to show. Click on Hide All to hide the rest.
    ScottA
  • @JimP: thats just what i wrote (or at least meant)

    @Nils: I was hoping that that this would be available to macro somehow.
  • SAVEASM seems to save it to the fileformat specified by the filename's extension. but for bmp it does not take the settings that i need :(
    I guess it is possible to writen an XP for that as these guys here www.pkdata.se/xp/optima32.html have one for sale so that you can do a macro like

    ' This macro will export all sheets as DWG files with [file namne]+_SHEET_+[sheet name]
    MACRO SDWGOUT
    GFNSP FName *.DWG
    IFERR end
    SAUTOHIDEON
    SSET;
    :loop
    SNEXT
    IFERR end
    SGETNAME SName
    GL DName FName
    APND DName _SHEET_
    APND DName SName
    APND DName .DWG
    SAVEASM DName
    IFP 1 loop
    :end
    ENDM
  • There are different commands for "SAVEASM" (in FCW or similar format) and "EXPORT" (as bitmap, I guess), and from what I understood in the Tome, the latter is not available in Macros, for whatever reason.

    Nils
  • When i do SAVEASM and enter text.jpg as filename, I get a jpg. So it basically seems to do what i want. But when i use text.bmp it creates a compressed bmp with a lousy resolution and just 8bit.
    So the only issue is that i cant influence the export settings for the bmp
  • Posted By: rattokan@JimP: thats just what i wrote (or at least meant)

    @Nils: I was hoping that that this would be available to macro somehow.
    Sorry, my eyes must have skipped over it.
  • 6 days later
  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    Posted By: rattokanSo the only issue is that i cant influence the export settings for the bmp
    I've had some issues with BMP myself with the SAVEASM command. However, have you tried using a png file instead? As png is also lossless, it should be just as good for importing into PS as a bmp file.
    You can also use the VBSM command. This is used for exporting a rectangular selection however, so it means you must also supply the appropriate coordinates from your map.
  • 4 years later
  • edited October 2017
    So... I realize I'm resurrecting a long dead thread, but I've just begun my journey toward learning CC3+ and rendering out a separate file for each sheet is something I feel is a necessity. It looks like saving each sheet out as a separate PNG is possible via scripting. Has anyone written such a script or has CC3+ had this functionality built into it in the past five years?
  • You can just hide all sheets you don't want to export. Do a Save As, and export the one visible sheet as a png or jpg or bmp. No scripting required.

    But I'm a bit confused why you would need to do this.

    Symbols on one sheet, ocean on another sheet, land masses on another sheet.
  • edited October 2017
    @JimP, Thank you for your response. Turning a sheet's visibility off, rendering, and repeating for 19 sheets is a bit cumbersome, but not terrible I think.

    I guess it's not completely necessary, but it's extremely useful if I want to work with each individual layer later in a graphics program. It makes it easier to add my own textures, effects, and to paint in further details. I can do this with a map where all the layers are all flattened and rendered together, but it's not as nice or as easy to work with.
  • I think you are confusing layers with sheets.

    Sheets determine what is drawn when CC3/CC3+ redraws and exports.

    Layers are there to group similar items.
  • edited October 2017
    I'm still learning, but, sheets in CC3+ seem to be what other programs call layers whereas layers in CC3+ are more like groups. This is my current understanding. I'm working through Joe Sweeney's videos right now.

    I plan to export each sheet separately, so I can use them as separate layers in my graphics program.... I think that's what I'm trying for. I haven't explored layers in CC3+ yet, so I may still be misunderstanding things.
  • JimPJimP 🖼️ 280 images Cartographer
    edited October 2017
    That sounds better. Or I finally understood.

    You can do lots of things in CC3/CC3+. I know some of the profesional folks here do export their maps and work with them in other software. But I"m not skilled in artistry, so I just use CC3/CC3Plus.
  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    edited October 2017
    You should be able to write a macro command to do this for you.

    SNEXT moves to the next sheet in the list
    WBSM is the macro equivalanent of saving a rectangular section.

    If you enter the sheets dialog and enables the option to automatically hide all sheets but the current one, you will only see one sheet at a time, and when working through them with SNEXT, you will only get one by one.

    I am a bit sure how to best terminate this gracefully in an automatic manner, but I guess you can have the macro ask for the number of sheets to process though. Means you need to count them up manually first, but that's not that much work.

    Edit: Looking back in the thread to the old posts, there seems to be macro there already.
  • @Monsen, thank you for that. I haven't looked into scripting just yet, but your idea sounds pretty solid. Thank you for the info. I'll definitely be looking into scripting sometime in the near future (working on getting a handle on the basics right now).
  • 5 years later
  • I know I'm really late to the game, but I'm trying to use this macro for PNGs instead of DWGs by replacing "DWG" in the script with ".PNG," but it only makes the first sheet a .png, then switches to making the files .png.bmp, and exporting them as .bmp files, which I can't convert to .png easily. It also gave me an error about not having enough memory to save at this resolution, which was weird. Any insight you can provide would be helpful

  • MonsenMonsen Administrator 🖼️ 81 images Cartographer

    Try this macro, it is an improved version that handles some problems that sometimes occur when you try to export a map without a proper MAP BORDER (And unfortunately, when you hide all the sheets, you also hide the map border, even if the map has one).

    Note that the following macro still have some considerations:

    • It expects the map to have a MAP BORDER layer and a map border on it. It uses this information to figure the size of the map and uses that size for all the sheets. This avoids the potential crash, and also ensures that all sheets are exported at the same size even if they are not filled with content
    • Sheets in CC3+ can have characters that are not valid in windows file names, such as a slash. Such sheets WILL cause an error message, and can cause the entire process to crash. Make sure to avoid special characters in sheet names when using this macro. Note that sheets with such names may be in the drawing by default, such as "WATERS/RIVERS" or similar, sheet names in official templates were never created with file names in mind.
    • Change the export settings in Tools -> Options -> BMP, JPEG, PNG before running the macro. Make sure to TURN OFF the launch image viewer option.
    MACRO TTT
    GFNSP FName *.PNG
    IFERR end
    GETLAYERL P0 MAP BORDER
    GETLAYERH P1 MAP BORDER
    SAUTOHIDEON
    SSET;
    :loop
    SNEXT
    IFERR end
    SGETNAME SName
    GL DName FName
    APND DName _SHEET_
    APND DName SName
    APND DName .PNG
    WBSM DName;P0;P1
    IFP 1 loop
    :end
    SSHOWA
    ENDM
    
    LoopysueJimProflo1Raiko
  • edited April 2023
    @Monsen I'm presuming that this exports the sheets with transparency?
    Does the macro above just export the currently visible sheets, or how could you change it to do so?
    I.e. if I were only interested in a few of the sheets (to save time).

    One thing that I was finding a limitation with CC3 (specifically DD3) is that I'd like to be able to export just some of the sheets, but with transparency - in order to use in the "foreground" layer in Foundry VTT. It adds a lot of atmosphere to an interior map if you can place cobwebs, etc above the PC / NPC tokens.

    This is a snip, from the Pathfinder Abomination Vaults module on Foundry that I'm running at the moment - not my map (as there are great maps included in the premium module), but I'd like to be able to do the same with maps of my own, and didn't think it was possible to get a transparent export from CC3.




    The walls (including wall shadows), cobwebs, chandeliers, curtains and doors all go into a layer above the tokens. I thought I'd need to use PS or Gimp to make such a dungeon map for VTT use. The elf with the gun is a player's token.
  • MonsenMonsen Administrator 🖼️ 81 images Cartographer

    Sorry, no, CC3+ doesn't support transparency on exports. This is no exception.

    Since you can't get sheet status (hidden or not) from a macro, you can't easily export just visible sheets this way, this takes all of them. I guess you could ask the user for each sheet, but that would be annoying and I've found that throwing up dialogs between exports seems to sometimes be crash prone. Best solution would probably be to make a copy of the drawing, then delete all the irrelevant sheets from the copy and just let the macro do them all.

    JimPRaiko
Sign In or Register to comment.