Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AutoCAD ActiveX Parameter Passing Problem
Message
De
26/10/1998 15:00:28
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
AutoCAD ActiveX Parameter Passing Problem
Divers
Thread ID:
00150616
Message ID:
00150616
Vues:
291
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform