.NET

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

An error occurred during "GetSplitCurves"

93 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 (93 Views)

Re: An error occurred during "GetSplitCurves"

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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community