Don't know if it will help Check out http://community.borland.com/article/0,1410,10194,00.html which is about hooking up Delphi and Autocad via OLE. They create a variant array using a particular real number type. AutoCad can be fussy about real vs integer stuff.
Wes > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Stephen Barker > Sent: Sunday, 2 November 2003 6:30 p.m. > To: Multiple recipients of list delphi > Subject: [DUG]: OLEVariant arrays > > > I'm having trouble passing an array into AutoCad - getting > one back is not a problem. > > code looks like: > > var > Spline, SplineCoords, StartTangent, EndTangent : OLEVariant; begin > SplineCoords := VarArrayOf([1,1,0, 5,5,0, 10,0,0]); > StartTangent := VarArrayOf([0.5,0.5,0]); > EndTangent := VarArrayOf([0.5,0.5,0]); > > Spline := Dwg.ModelSpace.AddSpline(SplineCoords, > StartTangent, EndTangent); > > error on last line says: 'The parameter is incorrect' > > I've looked in the System unit, and tried converting the > arrays from Variant to Olevariant using code like below but > still the same error. > > GetVariantManager(VarMgr); > VarMgr.OleVarFromVar(SplineCoords, vSplineCoords); > VarMgr.OleVarFromVar(StartTangent, vStartTangent); > VarMgr.OleVarFromVar(EndTangent, vEndTangent); > > thanks, > Steve > -------------------------------------------------------------- > ------------- > New Zealand Delphi Users group - Delphi List - > [EMAIL PROTECTED] > Website: http://www.delphi.org.nz > To UnSub, send email to: [EMAIL PROTECTED] > with body of "unsubscribe delphi" > Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ > --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
