.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error-AddLWPolyLine-

1 REPLY 1
Reply
Message 1 of 2
naresh
126 Views, 1 Reply

Error-AddLWPolyLine-

Hi
I am facing the mentioned error while adding lightweightpolyline by supplying the vertices array list here i am filling the vertices values by using the XAix arraylist and YAxis arraylist, here is my code in C#.Net so please try to solve it

tempp = 0;
axistemp = 0;
AcadLWPolyline pollyObj ;
vert = (vert * 2);
object[] vertices = new object [vert];
for (i = 0; i < ((vert / 2)); i++)
{
vertices[tempp] = XAix[axistemp];
vertices[tempp + 1] = YAix[axistemp];
tempp = tempp + 2;
axistemp = axistemp + 1;
}
try
{
objMspace = acdDoc.ModelSpace;
pollyObj = objMspace.AddLightWeightPolyline(vertices);
pollyObj.Closed = true;
}
catch(Exception e)
{
MessageBox.Show(e.Message);
}
}
1 REPLY 1
Message 2 of 2
naresh
in reply to: naresh

Hi all
I only got the mistake in my code
except declaring object
object[] vertices = new object [vert];
its working by declaring as Double
Double[] vertices = new Double[];

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost