Notice that in the method you posted, which works in the Autodesk sample,
the Commit() method on the transaction is called.
In your code which calls that method, another transaction is already active,
but you do not call Commit() on it before you call Dispose(), which aborts
the transaction, along with all inner transactions, regardless of whether
they were committed or not.
So, the method that calls the CreatePline or CreatePolyLine method starts a
transaction, but does not commit it.
Even though the inner transaction in the CreatePolyLine and CreateLine
methods are commited, they are still aborted if any enclosing/outer
transactions are not also commited. So, all of your transactions must be
committed by calling Commit() on them before you call Dispose().
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010
http://www.acadxtabs.com
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");
wrote in message news:6294317@discussion.autodesk.com...
Yes, I just copied the function from the sample.
Also, DeathTiger, the revised function you posted doesn't result in drawing
a line on my AutoCAD screen, so I'm guessing the problem is something I'm
doing elsewhere.
I can run through my code line by line in the debugger, it's just that the
line doesn't show up.
Message boxes show up, and the values of the variables look correct in
execution, it's just the line (in this case) is apparantly shy about showing
itself onscreen.
I was trying to create a reversed polyline, and it wasn't showing up
onscreen, so I plugged in the sample function "CreateLine()" just to see if
a tried and true function would result in a visible line.
?
If anyone is either interested or kind enough, I've attached the Visual
Studio file.