120 likes | 275 Views
Intellicad Visual Basic Application. Marian Kate Santos Programming Paradigm. History of Intellicad. created by Boomerang Technology Inc., a privately held developer of Autodesk AutoCAD-compatible software acquired by Visio in March 1997
E N D
Intellicad Visual Basic Application Marian Kate Santos Programming Paradigm
History of Intellicad • created by Boomerang Technology Inc., a privately held developer of Autodesk AutoCAD-compatible software • acquired by Visio in March 1997 • late in 1999 Visio set up the IntelliCAD Technology Consortium • there are now several developers shipping commercial versions of IntelliCAD 2000: • Brisnet • CADopia • StrucPlus
Why use IntelliCAD? • Unrivaled DWG file format compatibility • Affordability • Easy to use • LISP and VBA Development
Visual Basic Concepts • VB is a Visual programming language • 3 steps in constructing a program: • Build the User Interface • Customize the properties of the interface • Attach Program Code • VB is Event Driven. • VB is also an Object-Oriented programming language.
VB Project Contents • Form Files (.frm) • contain all interface controls and associated VB code • Module Files ( .bas) • store procedures, functions, constant and variable declarations available to every form in the project • MDI Parent Form Files (.frm) • container window that can hold several forms • Class Files (.cls) • objects created in VB
Standard VB Controls • Label • Text Box • Command Button • List Box • Combo Boxes • Frame • Image Box • Picture Box
Visual Basic for Applications (VBA) • programming language which can be found in a number of Microsoft Windows applications • developed by Microsoft as a variation of VB to provide a Windows-compatible programming environment
VBA Set Up for Intellicad • Define an Intellicad object. • Establish link between Intellicad and VBA. • Create subroutines which can be loaded from Intellicad.
VBA Set Up for Intellicad Step 1: Define an Intellicad object. • Intellicad object defined is the Intellicad Document. Global Doc As IntelliCAD.Document • Object is defined in VBA Module File(.bas) so that it can be accessed anywhere in the project
VBA Set Up for Intellicad Step 2: Add VBA object to project. • VBA object (.frm) is added to the project in a manner similar to VB (drag & drop). UserForm.frm is added to project.
VBA Set Up for Intellicad Step 3: Establish link between Intellicad and VBA. • Bind Intellicad document Doc to drawing file in use (drawParts.DWG) whenever VBA UserForm1.frm is called. Private Sub UserForm1_Initialize() Set Doc = drawParts.ThisDocument End Sub • Intellicad objects such as lines, circles, blocks, layers, etc. can now be added and drawn to the drawing file.
VBA Set Up for Intellicad Step 4: Create subroutines which can be loaded from Intellicad. Public Sub main() Load UserForm1 UserForm1.Show End Sub • This function loads UserForm1.Public functions defined in module files (.bas) can be called from the Intellicad interface.