Advanced Drawing Tools

A few weeks ago, I hosted a live stream taking a closer look at the drawing tools. Making this the perfect time to talk a bit more about the more advanced aspects of the drawing tools and how to utilize them properly and explaining a few things in more detail than appropriate for a stream.

Examples of advanced use of drawing tools is to draw aligned fills, drawing a path and have symbols placed along it or drawing a polygon and having it filled with randomly placed symbols. Basically, a lot of the things you can do using multiple steps with regular CC3+ commands can be automated and streamlined by making a drawing tool for it.

For this article, I am going to skip the basics. I am going to assume that you already know how to make new drawing tools and modify existing ones, and are aware of the standard settings you can do with a drawing tool, such as fill, color, sheet, layer and outline. I’ll add the usual word of warning though; don’t modify the official drawing tools, make copies and modify these. Each tool is stored in each own file, and when you make changes and save them, that file is updated. These are advanced tools, not simple settings, and as such, there aren’t a “reset to default” button you can click if you mess up.

Macro Drawing Tools basics

Creating an advanced drawing tool does include making a macro for the tool, but most of these macros are very simple boilerplate code that can just be pasted in and subtly changed, so don’t be afraid just because the word macro is mentioned. I’ll show you these basic macros here in this article.

There are a few minor issues when making tools with macros you need to be aware of, so let us just get these out of the way. All of these are related to the fact that the macro is stored in a separate file, and changes to this file isn’t properly detected by the dialog box:

  • You won’t be asked to save the changes if you have only changed the macro. So remember to manually hit that Save button in the drawing tools dialog after editing the macro.
  • When creating a new tool, it may still show the old macro from the previous tool. To make sure you are editing the right file, this is my recommend procedure when creating a new macro tool: Start by hitting the New button in the drawing tool dialog, give the tool a name, and hit OK. Now, start by clicking on a different tool, the click back to your new tool. This ensures things are loaded correctly. You can now hit the command to execute button, and if there is already some text in there, you can safely erase it and replace it with your new macro. Once you close the macro editor, remember to click save. If you’re the kind of double-checking person like I am, you can check that your new tool contains the appropriate macro by clicking on another tool in the list, and then back to yours, and then just look at the macro. It will be the right one, as long as you remembered to hit that Save button earlier. I know some people have been confused and feeling CC3+ didn’t save their macro properly, but if you follow these steps, everything should work perfectly.
  • When going back in to edit an existing macro tool, if this is the tool selected by default in the dialog, select another tool first, then click back to the tool. As above, this ensures that the correct macro is loaded into the editing box. You should do this even if you are not going to edit the macro text, for example if you wish to edit one of the default properties like color.
  • Drawing tools with a macro won’t have a preview. To fix this, make a regular CC3+ map to be used for the preview (it should be a very simple drawing just showing the result of the tool, don’t include things like borders or background), name this file the same as your drawing tool, and place it in the same directory as the tool. The tools are all stored in @system\drawtools\styleName\. Of if you are making a new tool for the standard CC3+ Mike Schley overland tool called “Black Cat”, the tool will be stored as @System\Drawtools\Overland Mike Schley\Black Cat.dto, the accompanying macro file would be called @System\Drawtools\Overland Mike Schley\Black Cat.dtm, and your preview drawing should then be @System\Drawtools\Overland Mike Schley\Black Cat.fcw.
  • When writing the macro, always make sure there is exactly one blank line below the macro, not more, not less. If there isn’t a newline after the last command, it won’t be run, only shown on the command line waiting for the user to hit enter to start it, and if there are more than one, then CC3+ treats a blank line as an instruction to repeat the previous command, and this means the previous command in the macro box, not starting the entire tool over from the beginning. The only reason to have more than one blank line at the end is if the very last command is a command that needs a blank line of input to terminate. For example, the polygon command continue asking for points until you give it a blank input which tells the command that you’re done. So for these special cases, you would have the first blank line to terminate the command, and then the second for the last line in the macro. (And for the record, when I say one blank line at the end, it means you can move the text cursor down to the line beneath the text, but not any further.)

When to apply the macro

To enable a macro command, just check the Use Macro Command checkbox. This enables the Command to execute button to allow you to edit the macro, and completely replaces the rest of the drawing tool. In other words, with this option enabled, you don’t get to draw anything using the regular features of the drawing tool, only the macro is executed.

But, if you also check the Apply macro after drawing checkbox, the macro is instead applied AFTER you have drawn with the drawing tool the regular way. This allow you to draw a shape, and have the macro do something with it. This is the most common use of macros in drawing tools, and are used for example for the forest drawing tool, where you first draw the area the forest should occupy, and then the macro fills it with trees.

Creating the advanced tools

So, let us look at several advanced tools. We’ll be quickly looking at how you can do this in CC3+ without the use of a drawing tool, and then how to set up a tool to use it.

Drawing a forest

CC3+ comes with the Fill With Symbols command [FOREST], and while it can technically fill an area with any symbol, it is best suited for forests due to the fact that it is primarily designed to pack symbols together tightly.

To draw a forest in CC3+ manually, you need to start by drawing a polygon (for example by using Smooth Poly ). Then you can start the tool from Draw -> Fill With Symbols. This bring up the configuration dialog where you can set you options, and when you click Run now, CC3+ will ask you to pick a polygon to be filled, and that’s it. However, for use with a drawing tool, we don’t want to see that configuration dialog every time. And this is where the Load and Save buttons in the dialog comes into play. Using this dialog, you can create your own forest setting, and save it to a file, which we can easily load in the drawing tool macro later. I won’t explain how to use the dialog here, that is a bit out of scope for this article, but if you own the Tome of Ultimate Mapping, it is explained more in depth there, along with the dialog from the other commands in this article. But, the general idea with these dialogs is that you can spend the time to try out different settings, and when you have found the setting you want to use for your drawing tool, save the setting to a file. This way you can experiment with the command and get things right first.

Now, once you have saved the setting you like to use to a file, you can create a new drawing tool.

When you create a new drawing tool for use with the forest, you’ll want these basic settings:

Draw Method: Path/Polygon
Options: Smooth
Closure: Closed
Properties: Whatever you want the background behind the trees to be, but ‘Solid 20’ is a nice fill style to just darken the area a bit. Remember to set width to 0 to make a filled poly, and set a proper layer and sheet for your needs
Macro: Both Use Macro Command and Apply Macro after drawing checked

Now, the interesting thing here is of course the macro itself. As I said early, these macros are just boilerplate code that can be copied and pasted. The macro for using the forest drawing tool is simply

FORESTLOAD @system\fillers\CC3_MikeSchley_Jungle.FIL

The first line is the line that loads the forest fill. This is the only line in the macro you have to change to point to the fill setting you made. Just change the path, and that’s it.
The second line in the macro, SELBYP, tells CC3+ that when requested to select entities, it should simply pick the last one used instead of asking the user. And that last entity will be the polygon we draw when we use this tool.

The final line is the command itself. This is the macro version of the command, and will just use the current settings instead of showing the dialog. And the current settings, well, they were set on the first line by loading that file. Furthermore, this command requires you to select an entity, but the SELBYP line above has just put CC3+ into prior selection mode, so instead of asking, it will just select the poly the command drew.

You might have seen macro commands also containing the commands SELSAVE and SELREST. These used to be necessary to be able to set the selection method back to what it was before, users tends to be confused if they use a command such as erase, and suddenly the last ting they drew was erased instead of CC3+ asking for you to select something. However, in the latest versions of CC3+, this is now automatic at the end of the macro, so there aren’t a need to manually include these anymore. They won’t hurt anything though. Note that if your selection method is ever off like that, simply typing SELBYD on the CC3+ command line and hitting enter will reset it to the default one.

And, that’s all there is to it.

Filling an area with symbols

This is very similar to the forest command above. The difference here is that we use the Symbols in Area [SYMFILL] command which is suited to fill an area in various ways with symbols. As with the Fill With Symbols, you can find Symbols in Area on the draw menu. Just draw a polygon in your map first to be filled, and then start the command, set the settings you’d like in the dialog, and hit OK. It will prompt you to select an area to be filled. Just as with the Fill With Symbols, you can experiment by changing the config in the dialog and try out various settings until you are happy with them, and when so, just save it to a file to be used with our tool.

The setup of the tool is identical to the Fill With Symbols command, the only real difference is the macro, which is

SYMFILLLOAD @system\fillers\CC3MS_Deadwood.symfill

Not much difference from the forest tool here, the commands are different, but the functionality is the same, first line loads the settings, third line runs the command.

Symbols along a path

CC3+ also have the Symbols Along [ESC] command that will draw symbols along a path. This is extremely similar to the symbols in area command, but it has some different options. You’ll find this command in the Draw menu with the others. As with the previous two commands, you can use the dialog to try out different settings, until you find something you are happy with, and then just save it to file. Remember to draw a path before starting the command, because it will ask for one once you exit the dialog.

Again, we see a very similar macro:

ESCLOAD @System\Fillers\CC3MS_Mountains.esc

I don’t think this needs further explanations.

Aligned Fills

A completely different approach is used for aligned fills. You have probably already noticed that when you draw a polygon in CC3+ with a bitmap fill, the fill is always aligned the same way no matter if you rotate the polygon or not. But, you can also create aligned fills in CC3+ by using the shaded polygon command. To do this, follow these steps.

  1. Draw a polygon using a bitmap fill style. Make sure the width is 0 so it becomes a filled polygon and not a hollow outline.
  2. Right click the Polygon button, and pick the Shaded Polygon (Angle by Edge) command. Now, click on one of the edges of your polygon to align the fill to that edge. You should see the fill rotate to the new alignment. Right click to finish using the command.
  3. You’ll probably noticing a color change in the fill, this is due to shading being applied. To fix this, use the Numeric Edit command on your poly, and check the Shade only Copy option. All done.

Now, can we make a drawing tool that does the same automatically?

That’s quite easy. start by creating a new drawing tool that draws with the fill you desire. Set any properties you need like sheet, layer, etc. Note that this doesn’t work with outlines, the outline will just seem to disappear.

Now, just check both macro options as before, and add the following macro:


This macro is even simpler than the previous one, because there is nothing to edit, it will always look like this.

First line should be familiar here, we are using select by prior to select the entity the tool drew whenever a selection is required.

The second line runs the shaded polygon command. The two zeros here sets the angle and the pitch. The angle determines the rotation of the fill, but our next line will change that, so we set it to zero. The pitch is for angled surfaces, like roofs, and determine how they will be lighted, but this isn’t appropriate when we just need a rotation, so we leave it at 0. The SHADEPOLY command expects a selection, but thanks to SELBYP, this will automatically be the shape we drew.

The third line sets the properties for the shaded polygon. 192 is basically a magic number that means that the options for angle it by the first edge, and shade only copy should be enabled. This means that the fill will be rotated using the first edge of your polygon as the base (so it does matter how you draw it). Setting the Shade Only Copy flag means it will only be rotated, not shaded, so it will keep the original coloration like we did manually above.

Macro-only tools

Sometimes, you don’t want to draw anything to be affected, you just want to run a macro to do something for you. And having the macro stored in a drawing tool, which you can then put in the symbol catalog window is a great way of having certain macros easily available. I have several of these ready for processing maps for the community atlas, macros that runs various clean-up commands and things like that in the map. This is a great way to activate a macro.

When the Use Macro Command checkbox is checked, and the Apply Macro After Drawing is unchecked, CC3+ will disregard the drawing step of the tool. It will still respect the set properties, like fill, color, width, layer (but not Sheet; Sheet isn’t really a property on entities, but rather a container for entities), unless overridden in the macro itself.

What you can to with the tools in this configuration is only limited to what you can do with a macro, so I’ll just leave you with the black cat macro I ended the live stream with. This is a very simple macro that first sets up some basic properties (fill, color, line width), and then just call the smooth poly command (SPOLY)  with a LOT of nodes to draw the cat. You’ll notice that I’ve broken the command down over multiple lines. With commands that require multiple inputs, you can separate each input with EITHER a semicolon (;) OR a line break (don’t use both, you can mix and match within a single command, but only one of them between each input, this is why in my macro below you can see that each line is multiple points separated with semicolon, but there is no semicolon at the end of the line, because there I am using a line break).

You’ll also notice that the first argument to the smooth poly command is ^D followed by some text.  All the coordinates in the smooth poly are relative coordinates, i.e. the change in location from the previous node as opposed to absolute coordinates. This is needed to place the cat where you want it instead of a fixed position on screen. This first ^D is a way to actually ask the user for the first node in the polygon. Whenever you need a user to provide input in the middle of a macro, this is done by specifying ^D immediately followed by some explanatory text which is shown to the user on the command line, instead of just providing a value like the rest of the coordinates. So what we end up with here is that we ask the user to place the first node wherever they wish, and then draw the rest of the cat relative to that.

Note that you can easily drop the first few lines that sets up the properties if you just set them up in the drawing tool the normal way instead. I just wanted to illustrate how to do this from the macro here.

^DPick starting point


If you have questions regarding the content of this article, please use the ProFantasy forums. It can take a long time before comments on the blog gets noticed, especially for older articles. The forums on the other hand, I frequent daily.


Comments are closed.