>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