.NET

.NET

Reply
Active Member
9 Posts
0 Kudos
Registered: ‎12-29-2006
Post 1 of 2

An error occurred during "GetSplitCurves"

101 Views, 1 Replies
12-29-2006 06:12 AM
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()
Active Member
9 Posts
0 Kudos
Registered: ‎12-29-2006
Post 2 of 2

Re: An error occurred during "GetSplitCurves"

12-29-2006 06:14 AM in reply to: WangYanbin
Developed with vs.net2003+objectarx2006.
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post