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

An error occurred during "GetSplitCurves"

1 REPLY 1
Reply
Message 1 of 2
WangYanbin
360 Views, 1 Reply

An error occurred during "GetSplitCurves"

Polyline pcb;
...

Point3dCollection clipboundary=new Point3dCollection();
for(int j = 0; j < pcb.NumberOfVertices ; j++)
{
clipboundary.Add(pcb.GetPoint3dAt(j));
}
DBObjectCollection dbc;
Entity ent = (Entity)myT.GetObject(id,OpenMode.ForWrite);
Curve c =ent as Curve;
if(c!=null)
dbc=c.GetSplitCurves(clipboundary);

When step into the last line "c.GetSplitCurves(clipboundary)" then throw an exception followed:

************** Exception Text **************
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Autodesk.AutoCAD.Runtime.Exception: eInvalidInput
at Autodesk.AutoCAD.Runtime.Interop.ThrowExceptionForErrorStatus(Int32 errorStatus)
at Autodesk.AutoCAD.DatabaseServices.Curve.GetSplitCurves(Point3dCollection points)
at MyCommand2006.ObjectClass.Crop(ObjectId oid) in d:\autocadsource\mysource\mycommand2006\objectclass.cs:line 366
at MyCommand2006.MyCommand.gettype() in d:\autocadsource\mysource\mycommand2006\mycommand2006.cs:line 82
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at AcMgCommandClass.Invoke(AcMgCommandClass* , gcroot<:REFLECTION::METHODINFO __gc="">* mi)
at Autodesk.AutoCAD.Runtime.SEHExceptionFilter.InvokeWorker()
at Autodesk.AutoCAD.Runtime.ExceptionFilter.Invoke()
1 REPLY 1
Message 2 of 2
WangYanbin
in reply to: WangYanbin

Developed with vs.net2003+objectarx2006.

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