Excel to Intellicad or /and Intellicad to Excel

#1
Hello

Is it possible to communicate from Excel to Intellicad ?
Is that possible, then it is very interesting for other colleges.They can use my costumer menu and other tools in Intellicad or the new Solidworks2005 with DWGeditor from intellicad

I'm a hydraulic technicien.I make Hydraulicplans.

In Solidworks 2005 is the New DWG-editor form Intellicad.
I have maded in Excel a sheet where a select components. Then I use a macro and the blocks with the Insertpoint are sent to AcadLT by using DDE connection.
For Acad-LT a have made a own Customermenu that i use in Intellicad and most of all works correct.The macro's in diesel fives problems.

Tool that I use for communicate between Excel and Acad
------------------------------
Global KanaalNr As Long
-----------------------------------
Sub Koppelen()
KanaalNr = Application.DDEInitiate("Autocad LT.DDE", "System")
End Sub
------------------------------------------
Sub Ontkoppelen()
Call Application.DDETerminate(KanaalNr)
End Sub
---------------------------------
Sub ExcelNaarACAD()
Dim LastRow As Integer
Dim Counter As Integer
Dim SymbolName, Xpos, Ypos
Dim Hydac

'Kolom met symbool naam
Const sSymboolKolom As String * 1 = "A"
'Kolom met x-pos
Const sXposKolom As String * 1 = "R"
'Kolom met y-pos
Const sYposKolom As String * 1 = "S"

Range(sSymboolKolom & "1000").Select
Selection.End(xlUp).Select
'Laatste rij met gegevens
LastRow = Val(Replace(Selection.Address, "$" & sSymboolKolom & "$", ""))

'Connectie maken met ACAD
Call Koppelen

'Voeg een symbool in, in ACAD
For Counter = 1 To LastRow
'Symbool naam
SymbolName = Range(sSymboolKolom & Counter).Value
'Symbool coordinaten
Xpos = Range(sXposKolom & Counter).Value
Ypos = Range(sYposKolom & Counter).Value
'sKolomC = Range("C" & Counter).Value

'Uitbereiden met overige symbool gegevens
Hydac = "[-Insert " & SymbolName & " " & Xpos & "," & Ypos & " ]"

If SymbolName <> "" Then
Call Application.DDEExecute(KanaalNr, Hydac)
End If

Next Counter

'Connectie met ACAD verbreken
Call Ontkoppelen

End Sub

Maybe You can help??

Thanks

Lambert Cox

#2
Lambert,

Excel's VBA and IntelliCAD's VBA can be referenced to allow each other's objects to be exposed.

In Excel's VBAIDE select Tools-->References form the pull down menu and scroll down to IntelliCAD 2001 Object Library and tick the box adjacent.

Excel now has a reference to all of IntelliCAD's objects and to see these just open the object browser by selecting F2.

Select the "All Libraries" and scroll down and select IntelliCAD to view all the classes.

The good news is that this works with the evaluation version as well as the professional versions of IntelliCAD.

You can program IntelliCAD from Excel.

If you have the professional version of IntelliCAD you can also reference Excel in the VBAIDE and program using Excel's objects from inside IntelliCAD.

------------------
Regards
John Finlay

#3
John

Thanks for the quickly answer
I wish you and the forum a happy and good New Year

I need Excel 2002 for programming and a found it on a other machine.
I try it aqain to communicate with Excel and Intellicad.(block,blockinsert,blocks)
A good beginning from the new year.

Thanks
Lambert