VISUAL CADD API
PROGRAMMING WITH DELPHI

Introduction

Visual CADD offers a rich programming interface for developers to build anything from simple one step functions to complex design interfaces, all within a quality drafting environment. This tutorial takes the Delphi programmer through some fundamental steps to create useful programs using the Visual CADD Application Programming Interface (API).

The Visual CADD API

The Visual CADD API consists of an extensive set of functions and procedures. The API functions and procedures are contained in a number of Dynamic Link Libraries (DLL files) supplied with Visual CADD. They allow programs written in Delphi to work directly with the a Visual CADD drawing. The API also provides for the development of stand alone applications that can operate independently of the Visual CADD program.

VCDlg32.DLL

VCMain32.DLL

VCTool32.DLL

VCTran32.DLL

VCType32.DLL

Making the API Available in Delphi

Delphi is able to access these procedures and functions through a corresponding set of Delphi units (PAS files) that declare the procedures and function. Download the file Delpas32.EXE from the Visual CADD Group. This is a self extracting file that contains the PAS files declaring the Visual CADD API procedures and functions. Unzip the PAS files and place them in the Delphi Library folder (C:\Program Files\Borland\Delphi 3\LIB for Delphi 3). When you write your programs and include references to these units in your uses clause, Delphi will be able to access the Visual CADD API procedures and functions.

VCDlg32.PAS

VCMain32.PAS

VCTool32.PAS

VCTran32.PAS

VCType32.PAS

Common Programming Tasks

There are a few common tasks that must be done in every Delphi program that you write for Visual CADD. I have included a Delphi unit I assembled (VCDelphi.PAS) that encapsulates a lot of this code already. Each time you write a Delphi program for Visual CADD, you can call one of the functions in this unit to get Visual CADD and your application talking. Go through this unit to check out the start up code fundamentals.

VCDelphi.PAS - Common Programming Tasks

Different Types of Programs

There are a number of different types of programs that can be written using the Visual CADD API.

  1. Delphi Setup
  1. Callin Programs From Within Visual CADD
    • Executable files (EXE) - formless functions
    • Executable files (EXE) - form based functions
  1. Stand Alone Programs Without Visual CADD

This tutorial (at this stage) only deals with writing Visual CADD applications using Delphi DLL projects. The Delphi programming examples available from Cadd Havre Delphi programming download section provide some good examples in the other areas.

Back to Main Programming Page