Hello,
I am starting to develop an application with IntelliCAD Professional 3.3 that will use VB (not VBA). For starters, I need VB to attach to IntelliCAD. I configured VB to reference the IntelliCAD object model, and that seems to work fine. All of the objects, methods, and properties are appearing through Intellisense in VB.
I'm trying to get the following subroutine to work properly so that my VB application attaches to IntelliCAD. I can't get it to attach. I believe that the problem is in the syntax for the path statement. Here is the code snippet with the subroutine:
Public Sub Attaching()
On Error Resume Next
'Dim pathname As Text
Dim Application As IntelliCAD.Application
pathname = "c:\Program Files\CMS\IntelliCAD PE V3.3"
Set Application = GetObject(pathname, "IntelliCAD.Application")
If Err.Number <> 0 Then
Err.Clear
Set Application = CreateObject("IntelliCAD.Application")
If Err.Number Then
MsgBox "Unable to launch IntelliCAD session."
End
End If
End If
Dim ThisDocument As IntelliCAD.Document
Set ThisDocument = Application.ActiveDocument
Dim oLay As IntelliCAD.Layer
Set oLay = ThisDocument.ActiveLayer
Debug.Print oLay.Name
Debug.Print oLay.Color
End Sub
Attachment with VB
Moderator: CMS Inc
- CMS IntelliCAD
- - FAQ - Frequently Asked Questions
- - General
- - AutoLisp/SDS
- - VBA, . NET & IRX
- - - FAQ
- - New User
- - Small Business
- - Realistic Rendering
- - Bonus
- - Free CAD .DWG Blocks
- - License Management
- - Store, Accounts and Purchases
- - Academic
- QuoteCAD Manufacturing
- - General
- - Quotation and Manufacturing
- - Database Manager
- - License Management
- ETOOLBOX CAD Viewer
- - General
- - License management