I am working with ActiveX for AutoCad version 14 in VFP 5.0. I have run the following code. All lines work until I reach the last.
I get an error message :
"OLE error code ox80020005: type mismatch"
The documentation for InsertBlock says it must be an array
of Doubles (double precision numbers). I thought VFP defaulted to
double precision.
** start of code
* ask user for a drawing (*.dwg) file
lcFileName = getpict("dwg","drawings")
* see if he picked on
if not file(lcFileName)
return
endif
* fire up ActiveX Automation for AutoCAD
oAcadApp = createobject("AutoCad.Application")
* show it
oAcadApp.Visible = .t.
* create document object
oAcadDoc = oAcadApp.ActiveDocument
* open the file
oAcadDoc.Open(lcFileName)
* dimension and set the insertion point (3D)
dime aInPt(3)
aInPt(1) = 190.00
aInPt(2) = 120.00
aInPt(3) = 0.00
* create the Model Space Object
oModel = oAcadDoc.ModelSpace
* insert the block
oBlkIns = oModel.InsertBlock(aInPt,"BHPLOGO")
Am I not passing double precision numbers? Any help please.
Best Regards
Don Simpson