Remy Monsen | October 13, 2020 | C++, CC3 Plus, development, XP Development
This is the fourth article in my series about XP development. To understand this article properly, you should be familiar with the contents of the previous articles.
In this article, I’ll be taking a closer look at how to interface with some of CC3+’s own functionality, in this case how to set CC3+ variables and how to call native CC3+ commands from an XP. I’ll be showing you how to use the SetVar and ExecScriptCopy API calls.
Continue reading »
Comments Off on Developing Add-Ons for CC3+ – Part 4: Interacting with CC3
Remy Monsen | October 30, 2019 | C++, CC3 Plus, development, XP Development
This is the third article in my series about XP development. To understand this article properly, you should be familiar with the contents of the previous articles.
When writing commands for CC3+, we frequently need to communicate with the user. This is often in the form of requesting some data from the user, such as where to place a node or which color to use, or we want to provide information to the user, such as instructions on the command line or the information the user requested. In this article, I’ll talk about the Text Formatting & Output Service (FormSt) used to prepare data to display to the user, and the data request format (ReqData). We have been touching both of these briefly in the two prior articles, but it is time to discuss these a bit more in depth.
Continue reading »
Comments Off on Developing Add-Ons for CC3+ – Part 3: Communicating with the User
Remy Monsen | April 2, 2019 | C++, Visual Studio, XP Development
Campaign Cartographer 3+ is a a very configurable and extensible program. In addition to the core program, users can purchase official add-ons, providing not just new artwork, but also new tools. Users can easily add new artwork such as symbols and fills, and many users with an artistic talent create such resources themselves and import into CC3+ for use with their maps. It is also easy for users to create their own drawing tools and organize symbols into symbol catalogs. For the more advanced users, it is possible to customize the menus and toolbars, and write macro commands which can be used to add additional functionality or automate tasks.
But, the most powerful option is the possibility of writing your own add-ons, or XP’s. While you can do a lot with macros, you are still limited to the commands actually provided by CC3+. Clever combinations of these commands can yield interesting results, but sooner or later you will run into things you can’t do. And this is where XP development comes in. By writing your own add-ons for CC3+, you get direct access to the building blocks of your drawing, and can write your own commands for CC3+ to do all kinds of stuff.
In this series of articles I will teach you how to write these add-ons yourself. A word of warning here; these articles will teach you about XP development, but I’ll have to assume you actually know something about programming, and in particular, C++. If you don’t know that, I recommend you find yourself a free C++ tutorial on the internet and start there before coming back, as you will have problems following the tutorials otherwise.
In this first tutorial we’ll look at how to set up your programming environment, as well as making our first code.
Note that you can easily find all the articles published in this series so far by using this link.
Continue reading »
2 Comments