In this post and the next two posts, I will be building a spiral command. In this post we will be dealing with the algorithm. When we are done with this post, we will have a command that draws a spiral that would have 20 loops if it started in the middle, but we also told the algorithm to not draw the innermost 10 loops. We have also hard currently coded the command to draw the spiral with a distance of 10 between each loop.
I will be using the name MYSPIRALM for this temporary command. When finished, this will be the command for the macro version.
Note: There is a naming convention that states if you have both a dialog driven command and a comand that is all command line for macros, the macro version ends with an M.
- Distance Between Loops: 10
- Number of Inner Loops Not Drawn: 10
- Total Number of Loops: 20
- Clockwise/Counter Clockwise: Clockwise
- Growth Between Loops: None
Friday, August 20, 2010MyLine Command (A Complete Example)
We have finally reached the point where we can produce an entire example. In my previous post I explained how, conceptually, this command will work. Now, here is the actual code for the command along with a lot of comments.
I have also copied and commented out the definitions for the relevant elements that we are going to create.
I hope that you fire up Visual Studio and try building this code; if you are impatient though and want to just run it, here