Why GanttPV? Help Scripts Server Developer Object Role Modeling
How to create GanttPV scripts
The easiest way to learn GanttPV scripting is to modify and experiment with existing scripts. You will need to learn something about the Python scripting language, and, depending on your goals, you might need to know about the wxPython widgets library.
Python is a delightful scripting language. The best introduction to the language is the Python Tutorial (tut.pdf) that comes with Python. It can be downloaded from the Python web site. Python documentation is surprisingly good and beautifully formatted. The Python Library Reference (lib.pdf) is also useful. But the best book to keep in hand is the Python Pocket Reference by Mark Lutz from O'Reilly. (If only their other pocket books were as good.)
If you want your script to interact with the users, you will need to learn something about wxPython, the Python interface to the wxWidgets GUI development library. The library itself is near wonderful (if rough around the edges), but the documentation is poor. wxPython is only usable because of an excellent set of demo programs (full of working examples of key features) and an active developers mailing list. If possible try to cut and paste something from another script that is close to what you need.
You will also need to learn how data is organized and updated in GanttPV. The following information is provided to help you to understand what scripts are doing.
Visit the "Creating Scripts for GanttPV" forum
The scripts forum is the place to:
You may wish to register in the forum. Registration will reserve the name you chose and allow you to edit your posts.
If you decide not to register, you may still make posts in your name. When you have the post ready to add, just enter your name and leave the password field blank.
GanttPV data is defined as tables ("Project", "Task", "Holiday") and columns ("Name", "StartDate"). See Data. Each project, task, or holiday is a row in one of these table. Every row is identified by a unique "ID" number.
To access data you specify: the table, the id, and the column name. For example, to print the name of project number one, you would type:
For "Project" and some other tables a short cut is provided, so you may also see the shorter form:
Use Update and SetUndo for all changes to the database
Treat GanttPV data tables as "READ ONLY". Don't change them directly. All updates should be made through the routines "Update" and "SetUndo".
There are several reasons for this: (1) it makes the effects of your script undo-able, (2) it refreshes all reports that may be affected by the change, (3) it will make planned future upgrades much easier (for example, keeping project data in a relational database).
Here is an example of how you would change the name of project #1 to "New Name".
Data.SetUndo('Change Project Name')
Routines that can be used in your scripts
* Names marked by an asterisk are tentative and may be changed based on later reflection and feedback. We look forward to you comments and suggestions on names in the GanttPV Forum.
Windows 98 (v0.7)
MacOS 10.4 or later (v0.11b)
MacOS 10.2 or 10.3 (v0.7)
Source [Linux, Unix] (v0.11b)
Release Notes (v0.11)
Other LinksAlexander's FAQ
Simple Project Management
Using GanttPV (must read!)
Simple Project Management: The Book
Managing Projects with GanttPV