Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP6 and AutoCad
Message
De
24/04/2000 15:35:41
 
 
À
19/04/2000 18:06:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00361590
Message ID:
00362883
Vues:
16
>I am quite ignorant in the ways of all of this so here are my basic questions.
>
>I have a pretty strong background in AutoCAD and somewhat capable in VFP but don't know how to mix the two. How do I open and manipulate a drawing from VFP6? That's probably enough for now...

I am able to open an AutoCAD drawing with VFP and save it with a different name using the following:

oAcad = CREATEOBJECT( "Autocad.Drawing" )
oAcad.SAVEAS("Test")


Next I want to edit the drawing. The VBA function AddText receives the following three parameters: (TextString As String, InsertionPoint, Height As Double). The example shows the InsertionPoint value as an array created with:
Dim insPoint As Variant 'Declare insertion point variable
insPoint = utilobj.CreateTypedArray(vbDouble, 2, 4, 0)

(2, 4, 0 being the X, Y, Z insert coordinates)

The CreateTypedArray Description in the VBA help says:
Creates a variant that contains an array of integers, floating numbers, doubles, etc. The resulting variant can be passed into any AutoCAD method or property that accepts an array of numbers as a variant.

I tried it with this several ways of entering the X, Y, Z information but usually get the following program error:
"OLE lDispatch exception code 0 from AutoCAD Application: Invalid argument insPoint in InsertionPoint property.."

The question: How do I replicate this VARIANT using VFP6?
Jim Philippi

quando omni flunkus moritati
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform