Useful commands – Select nearby symbols & Delete nearby symbols

Did you know that CC3+ (including all addons) contains over 1000 commands in total? And that new ones gets added with just about every update?

Today, we’ll have a quick look at two of the somewhat more recent commands; Select nearby symbols and Delete nearby symbols. Both these commands are intended to help you manipulate symbols that are near another entity. This can for example help you clean up symbols that are too near a river, or help you select all the houses along your main street, for example so you can change their varicolor.

 

Below is an example of a forest with a river running through it. On the left image, the trees are obstructing the river, while on the left one, Delete nearby symbols have been run to automatically delete the trees near the river.


To accomplish this, Delete nearby symbols was used. This is a command-line only command, but it is easy to use. Simply type in SYMDELNEAR on the command line and hit enter. The command line will then prompt for the selection distance, this is simply the distance from the entity to affect. For my 10 by 10 mile map above, I opted for 0.15, but the value depends on the symbol scale. No matter what value you select, just type in the value on the command line and hit enter. Finally, CC3+ wants you to select the entity to delete symbols near, so select the river and hit Do It. The result should be similar to the image to the right. Note that this command does not support Undo, so save your map before using it so you can quickly recover if the command deletes more than desired.

Do note that the forest in this example was drawn by the Symbols in Area command. Forests drawn with Fill with Symbols (the default command for most forest drawing tools) will not work as well because the way these forests are constructed. For example, instead of placing individual trees, the fill with symbols command places symbols that contains large blocks of trees. This is very important for performance, as forests with thousands of individual tree symbols can cause serious slowdowns, but the downside of this approach is that there aren’t individual trees to remove, and removing a full block tends to leave weird rectangular gaps. For forests draw with the forest tools, I recommend removing the entire forest, and then draw it anew around the river using the exclusion commands instead.

 

 

Using Select nearby symbols is very similar, but there is an important difference. As you know, in CC3+, you usually select entities after starting the command, not before, so how are you going to use a command that selects entities for you? The solution here is selection by prior. Whenever you are prompted to do a selection, you can simply hit the P key on your keyboard, and CC3+ will automatically select the prior set of entities you had selected. So we can just use the Select nearby symbols to generate a selection for us, and then, we start the desired command and simply hit P at the appropriate moment to re-use that selection.

On the images below I’ve used this command to change the varicolor on the houses around the ring without touching the other houses. To do this, I followed a simple two-step process. First, I used Select nearby symbols by typing SYMSELNEAR on the command line (followed by enter). Then, just as for the Delete nearby symbols, I typed in the distance. This time, I used 20 which is a reasonable size in city scale, and finally selected the ring. After doing this, the command completes, and nothing seems to have happened. However, I can now click¬†Change Properties and when prompted to select entities, I simply hit the P key on the keyboard to use the prior selection (Which Select nearby symbols set up for me). The correct houses should now be selected, I can Do It to accept the selection, and change the properties as I like, in this case changing the color to red (obviously, this only works if the houses are varicolor symbols in the first place).

Note that these commands look at the entity, not just it’s visual representation. For example, if I used a circle entity with a width (this results in a hollow circle with an outline) for my road above, CC3+ still consider the entire interior area as part of the circle and thus every symbol inside would be in range for selection. So, the ring road in this example needs to be a path. I solved this by drawing it as a circle, then using the¬†Split command on it.

Leave a Reply