.NET

.NET

Reply
Active Member
WangYanbin
Posts: 9
Registered: ‎12-29-2006
Message 1 of 2 (100 Views)

An error occurred during "GetSplitCurves"

100 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
WangYanbin
Posts: 9
Registered: ‎12-29-2006
Message 2 of 2 (100 Views)

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
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.