ChartDirector 7.0 (ASP/COM/VB Edition)
Installation
To install ChartDirector for COM/ASP/VB, simply run the ChartDirector installer EXE file. This will launch the installer that will guide you through the rest of the installation process.
Version Compatibility
ChartDirector for COM/ASP/VB is a Common Object Model (COM) component that implements the "Automation" interface. This allows the ChartDirector API to be accessible using ASP, VB 6, VBA, VBScript, and software that supports the COM Automation interface.
Sample Programs
ChartDirector for COM/ASP/VB comes with a number of sample programs for ASP, VB 6, and VBScript. They are good tutorials on how to use ChartDirector.
(Note: In the following table, "[ChartDirector]" refers to the ChartDirector installation directory. The default is "c:\Program Files\ChartDirector".)
Location | Description
|
---|
[ChartDirector]\aspdemo | These are ASP sample programs. To use them, please copy them to the IIS web server directory so that they become accessible through the IIS web server. The index page for the ASP sample programs is "index.asp". Please access this page with a browser to view the samples.
|
[ChartDirector]\vbdemo | These are the main VB 6 sample program, containing over 100 sample charts.
Simply go to the subdirectory and double click on the "VBChartDemo.vbp" to open the Visual Basic sample project.
(Note: The VB 6 referred to classical Visual Basic 6.0. If you are looking for VB for the .NET platform included in Visual Studio 2002 or later, please download "ChartDirector for .NET" instead.)
|
[ChartDirector]\vbHelloWorld | A Visual Basic sample program that just contains one simple bar chart.
|
[ChartDirector]\vbsdemo | These are standalone VBScript sample programs that produce charts as image files. They can be run from the command shell by using the command line "cscript [script_name]".
Note: Make sure you have write access to the sample program directory, otherwise the sample programs may be unable to create image files. If ChartDirector is installed in "c:\Program Files", in some Windows machine, you may need to use "Run As Administrator" to gain write access to the directory. Alternatively, you may copy the sample programs to a non-system directory and runs them from that directory.
|
Testing the ChartDirector Installation
To verify that ChartDirector has been installed correctly, the simplest way is to run any of the sample programs that come with ChartDirector. If you can run any one of the sample projects, it can be confirmed that ChartDirector is installed correctly.
If you are working in a web environment, and for some reason ChartDirector is not working, please copy the ChartDirector sample programs to your web server, access the index page, and click on the "check installation" link for diagnostic messages.
Installing ChartDirector without Using the Installer
If for any reason you cannot run the installer on a computer or web server, you can still install ChartDirector by copying certain DLLs to the computer and registering them as COM components manually.
First, find a computer to install ChartDirector so that you can extract the files out. Then perform the following steps:
- Copy "msvbvm60.dll" and optionally "ChartViewer.ocx" from the windows system directory of the source computer to that of the target computer. The windows system directory is normally called "system32" under the "windows" directory on 32-bit windows, and "SysWoW64" on 64-bit windows. The "ChartViewer.ocx" is the ChartViewer ActiveX control for GUI applications, such as VB6 or VBA applications. It is not needed for web applications, such as IIS/ASP applications, or command line applications.
- Register the files in the previous step by opening the command prompt using "Run As Administrator", change to the windows system directory, and enter "regsvr32 msvbvm60.dll". If ChartViewer.ocx is used, then also register it using "regsvr32 ChartViewer.ocx".
- Copy all files from "[ChartDirector]\lib" to the to the installation directory of the target system, which can be any directory. There should be six files in total: chartdir??.dll (?? = version number), aspapi.dll, comchartdir.dll, regdll.bat, cdreg64.exe and cdinfo.hta. The three DLLs are the ChartDirector DLLs. The other files are for registering these DLLs and verifying the installation.
- In the command prompt, change to the installation directory, then enter "regdll" to register the ChartDirector DLLs for both 32-bit and 64-bit usage. (Note: 64-bit usage only applies to 64-bit Windows.) Instead of using "regdll", you can also use the windows registration tool "regsvr32" to register the DLLs, but "regsvr32" can only register these DLLs for 32-bit usage. Only two DLLs needs to be registered: aspapi.dll and comchartdir.dll. The other DLL "chartdir??.dll" is not a COM DLL and cannot be registered.
If you are using ChartDirector in a 32-bit application, such as a VB6 application, registering ChartDirector for 32-bit usage is sufficient. If you are using ChartDirector in an IIS/ASP web application on 64-bit Windows, it is suggested to register ChartDirector for both 32-bit and 64-bit usage.
Note: If you are using ChartDirector with a web application, please ensure the web server "anonymous user" has read and execute access to the above DLLs.
Installing the ChartDirector License
If you have purchased a license to use ChartDirector, you should have a license key delivered to your via email and postal mail. Please install the license key as according to the following instructions.
Even without a license key, ChartDirector will work normally, but the charts will include a yellow bar at the bottom that marks the charts as produced by the "unregistered" ChartDirector. You can freely test ChartDirector for as long as necessary.
If your license key is for upgrading from a previous version of ChartDirector, please append the upgrade license key to the previous version license key, and use the combined license key.
ChartDirector Developer License
Please follow the steps below to install the license key for the "ChartDirector Developer License":
- Create an ASCII file using Notepad or other text editor, and put the license key in it. The whole file should contain only the license key. Save the file as "chartdir.lic".
Note that some text editors, such as Notepad, may automatically append ".txt" to the filename. If file is saved as "chartdir.lic", it may end up as "chartdir.lic.txt". In this case, please rename the file back to "chartdir.lic".
- Copy the "chartdir.lic" to the windows directory (normally "c:\windows" on Windows) or the "/etc" directory (for Linux/macOS).
The above directory is a system directory and may require administrative privileges for write access. If you are copying using the command prompt, please make sure you use "Run As administrator" to start the command prompt (for Windows), or use "sudo" (for Linux/macOS).
- If you cannot copy to a system directory (eg. due to lack of administrative privilege), you can copy "chartdir.lic" to the same directory as "chartdir??.dll" (should be in [ChartDirector]\lib, ?? = version number).
The license file should remove the "unregistered" message on the charts. If the license file appears to have no effect, please refer to
http://www.advsofteng.com/license_diag.html for trouble-shooting instructions.
ChartDirector Redistribute License
The "ChartDirector Redistribute License" can be installed using the same method as that of the "ChartDirector Developer License". If your application is distributed as a compiled executable, you can compile the license key directly into the executable. This avoids redistributing the license file. To do this, simply add a line in your code to call
ChartDirector.API.setLicenseCode and pass the license key as the argument.
For example, in VB/VBScript, the code is:
cd.setLicenseCode(".....your-license-key.....")
where "cd" is an
ChartDirector.API object.
Redistributing ChartDirector
If you have created an application using ChartDirector, and you want to distribute your application to other computers, you will need to redistribute the ChartDirector runtime with your application. You may redistribute the ChartDirector runtime provided you have obtained the necessary redistribute license.
The files that need to be redistributed and how can they be installed and registered are listed in the above section "Installing ChartDirector without Using the Installer".
© 2021 Advanced Software Engineering Limited. All rights reserved.