You problem is most likely a result of bad coding habits.
Many places in your code, you are calling 'xrec.Data.AsArray'
on the same XRecord object.
You should call the 'xrec.Data.AsArray' once, and assign the
result to a variable (typed as an array of TypedValue), and
use that variable in your code, rather than repeatedly calling
xrec.Data.AsArray.
If you did that, you would probably find the error (sorry, I do
not have time to debug that code).
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011
http://www.acadxtabs.com
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");
wrote in message news:6388317@discussion.autodesk.com...
The question are very very old but i've the same problem.
I've attached the code.
Sometimes the error is eInvalidresbuf with str1=2 str2 =-1, sometimes error is
einvalidresbuf with str1=2b str2=5 and sometimes str1=4 str2=5
N.B.
str2=5 is the correct number of elements that i expect
I'm using Vb.net 2005 and autocad 2007
best regards