PART-1 Writing a Simple Plugin |
In this our first topic we will cover how to write a simple Plugin.
In preparation for what is to come please read the following files which came with the new version of Tread3D.
These files are located under the following directories:
TreadAPI.h located under Tread3D\Examples\Plugins
LeakTracePlugin.h located under Tread3D\Examples\Plugins\leaktrace
ReadMe.txt located under Tread3D\Examples\Plugins\shapes
We would also recommend that you read all the ".h" files in the Plugin directory.
These files can be read with "Notepad".
Now, the part that is going to hurt, make sure you have the latest copy of Microsoft Visual C++.
We suggest you have a copy of Microsoft Visual Studio 6.0 (with Service Pack 4) Professional Edition.
You will now have several weeks to digest all this information and load C++ on to your computer before we start.
|
PART-2 Writing a Simple Plugin |
Hopefully you have now read the documentation that came with Tread3D and installed your C++ program. (Please make sure you have read TreadAPI.h located under Tread3D\Examples\Plugins)
Now, if you have no idea how to program in Visual C++, we won't lie to you and say you can write a Plugin, so please read a good book on Visual C++ programming. In the interim it would not hurt to follow along with us, it can only help.
For those of you who know Visual C++ programming, let's begin. All of the Plugins for Tread3D will be in the form of a .dll which is a "Dynamic Link Library" file and all this means is that you will be connecting a function in the .dll to the Tread3D program.
The first and most important thing you can do is layout a logic diagram or flow chart for what you want to accomplish. Below is just an example:
Tread3D is running
There is an entity displayed in the "Editor Workspace"
An entity is now highlighted
The Plugin is now activated
If no entity is highlighted the plugin asks you to highlight one and sends you back to the "Editor Workspace"
The plugin displays the entity and its parameters in .map format in a new window
The plugin allows you to modify or add to the entities parameters
You can now accept the changes or cancel the changes
The plugin now returns the entity with or without changes to Tread3D
The Plugin is now deactivated
In the next installment we will deside what plugin to generate and construct a logic diagram or flow chart. Also we will explore the functions contained in the TreadAPI.h folder. This is a header file, which contains all the Tread definitions you will need to create a plugin.
|
|