AnsweredAssumed Answered

Strange Error (rpc_e_disconnected) when trying to access Curve

Question asked by Julian Wotschke on Jan 27, 2016
Latest reply on Jan 27, 2016 by Artem Taturevych

Hello everyone,

 

in my programm I have to automatically associate a number of points with certain preselected edges of the model. Therefore I created a class which holds the pointdata and contains an enity which i use for keeping track of the edge. When associating the points and the edges, I take an edge, convert it to an entity, use GetSafeEntity() and store the resulting safe entity with the corresponding point.

When I am done with that process, I create a sketch to illustrate the results. Then the user can make changes manually. When I invoke my method to draw the sketch a second time to show the new results an unexpected error occurs (0x80010108 (RPC_E_DISCONNECTED)). This is the part of my code which causes the error:

 

     Vertex vs = (Vertex)((Edge)punkte[i].grundbahnkante).GetStartVertex();

     Vertex ve = (Vertex)((Edge)punkte[i].grundbahnkante).GetEndVertex();

     double[] start = (double[])vs.GetPoint();

     double[] ende = (double[])ve.GetPoint();

     double[] tessPoint = ((Curve)((Edge)punkte[i].grundbahnkante).GetCurve()).GetTessPts(0.0001, 0, start, ende);

 

"punkte[i].grundbahnkante" contains a safe entity corresponding to an edge. The first four lines are executed properly and give the expected results. The last line causes the error.

As I said this error always occurs when I invoke the method for creating a sketch a second time. The first time it works fine.

 

I hope someone can help me. Thank you in advance.

Outcomes