[code][quote author=troga link=topic=29269.msg348168#msg348168 date=1245790128]
[quote author=Glenn R link=topic=29269.msg348164#msg348164 date=1245789254]
Without more information, members would only be guessing.
When posting, to get the maximum chances of people responding, you should provide the following:
1. Code
2. Example data
3. AutoCAD version
4. .NET Framework version
5. OS (including 32bit vs. 64bit)
6. Visual Studio version (or your IDE choice and version)
With no more info than what you've supplied, I would only be guessing; is the GetPoint call inside your transaction for the newly created polyline?
[/quote]
First, thanks for the fast reply...
1. will apply tomorrow... currently @home
2. ... like no. 1 ...
3. ACAD 2009
4. Vista 32 Bit
5. Visual Studio 2005
6. Yes it´s inside the transaction...
Thanks, I´ll provide the rest of the data tomorrow...
[/quote]
ok, found a copy of the code :-)
AcGe.Matrix3d ucs = _Ed.CurrentUserCoordinateSystem;
AcGe.Point3d origin = new AcGe.Point3d(0, 0, 0);
AcGe.Vector3d normal = new AcGe.Vector3d(0, 0, 1);
normal = normal.TransformBy(ucs);
AcGe.Plane plane = new AcGe.Plane(origin, normal);
AcDb.Polyline pline = new AcDb.Polyline(points.Count);
pline.Normal = normal;
foreach (AcGe.Point3d pt in points)
{
AcGe.Point3d transformedPt = pt.TransformBy(ucs);
pline.AddVertexAt(pline.NumberOfVertices, plane.ParameterOf(transformedPt), 0, 0, 0);
}
using (AcDb.Transaction tr = _Tm.StartTransaction())
{
AcDb.BlockTable bt = (AcDb.BlockTable)tr.GetObject(_Db.BlockTableId, AcDb.OpenMode.ForRead);
AcDb.BlockTableRecord btr = (AcDb.BlockTableRecord)tr.GetObject(bt[AcDb.BlockTableRecord.ModelSpace], AcDb.OpenMode.ForWrite);
AcDb.ObjectId plineId = btr.AppendEntity(pline);
tr.AddNewlyCreatedDBObject(pline, true);
tr.Commit();
AcEd.PromptPointOptions opts = new AcEd.PromptPointOptions("\nPlease select direction: ");
opts.UseBasePoint = true;
opts.BasePoint = points[0];
AcEd.PromptPointResult result = _Ed.GetPoint(opts);
if (result.Status == AcEd.PromptStatus.OK)
tempPt = result.Value;
else
{
return;
}
}
[/code]
also the message:
utodesk.AutoCAD.Runtime.Exception: eNotApplicable
bei Autodesk.AutoCAD.Runtime.Interop.ThrowExceptionForErrorStatus(Int32 errorStatus)
bei AcMgUserInteraction.{ctor}(AcMgUserInteraction* , AcApDocument* pDoc, Boolean prompting)
bei Autodesk.AutoCAD.EditorInput.Editor.DoPrompt(PromptOptions opt)
bei Autodesk.AutoCAD.EditorInput.Editor.GetPoint(PromptPointOptions options)
bei MM_MechanicalSheet.MechanicalSheet.FoilBend()
bei Autodesk.AutoCAD.Runtime.CommandClass.InvokeWorker(MethodInfo mi, Object commandObject, Boolean bLispFunction)
bei Autodesk.AutoCAD.Runtime.CommandClass.InvokeWorkerWithExceptionFilter(MethodInfo mi, Object commandObject, Boolean bLispFunction)
bei Autodesk.AutoCAD.Runtime.CommandClass.Invoke(MethodInfo mi, Boolean bLispFunction)
bei Autodesk.AutoCAD.Runtime.CommandClass.CommandThunk.Invoke()
and attached a sample DWG