Excel to Intellicad or /and Intellicad to Excel
Posted: Thu Dec 30, 2004 12:12 pm
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
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