open ZWCAD from Excel
open ZWCAD from Excel
04-01-2012 08:29 . am | View his/her posts only
Hi,
I would like to be able to build a drawing in ZWCAD from Excel VBA. That would include the following steps:
1. Open ZWCAD if it is not already open
2. draw a line, polyline
3. draw solids (cube, sphere etc.)
4. save the drawing
5. export the content as SAT
6. close the application
Any suggestions, examples?
Thank you
Katto01
I would like to be able to build a drawing in ZWCAD from Excel VBA. That would include the following steps:
1. Open ZWCAD if it is not already open
2. draw a line, polyline
3. draw solids (cube, sphere etc.)
4. save the drawing
5. export the content as SAT
6. close the application
Any suggestions, examples?
Thank you
Katto01
open ZWCAD from Excel
11-01-2012 10:46 . am | View his/her posts only
You neeed use COM object
Please look at this code fragment
Sub open_dwg()
Dim ZwCAD As ZwcadApplication
Dim frame As ZwcadDocument
Dim frameMSpace As ZwcadModelSpace
'create ZWCad Application
Set ZwCAD = CreateObject("ZwCAD.Application")
'open dwg-document
Set frame = ZwcadApplication.Documents.Open("'lib'frame.dwg")
'set model variable
Set frameMSpace = frame.ModelSpace;
'............
'
'insert here your function and code for adding object
'look at help for ModelSpace and adding objects
'
'............
End Sub
Please look at this code fragment
Sub open_dwg()
Dim ZwCAD As ZwcadApplication
Dim frame As ZwcadDocument
Dim frameMSpace As ZwcadModelSpace
'create ZWCad Application
Set ZwCAD = CreateObject("ZwCAD.Application")
'open dwg-document
Set frame = ZwcadApplication.Documents.Open("'lib'frame.dwg")
'set model variable
Set frameMSpace = frame.ModelSpace;
'............
'
'insert here your function and code for adding object
'look at help for ModelSpace and adding objects
'
'............
End Sub
open ZWCAD from Excel
05-03-2012 03:33 . pm | View his/her posts only
does it help?
open ZWCAD from Excel
17-03-2012 12:24 . pm | View his/her posts only
i want to study it ,, how I get it ?,, Thanks
open ZWCAD from Excel
23-03-2012 11:03 . am | View his/her posts only



