Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
AutoCAD ActiveX Parameter Passing Problem
Message
 
 
To
26/10/1998 15:00:28
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00150616
Message ID:
00150691
Views:
14
Don,

You can't pass a VFP array to a OLE sever like that. Vlad posted a cool way to convert to double last week using a couple of lines of C code in a DLL. You could use that to build a string that represented the 3 doubles and pass that to AutoCad.

>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.

>* 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")
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform