How to insert vertex at the beginning of the polyline3d?

How to insert vertex at the beginning of the polyline3d?

azaytsev
Explorer Explorer
625 Views
2 Replies
Message 1 of 3

How to insert vertex at the beginning of the polyline3d?

azaytsev
Explorer
Explorer
Hello.
I need to insert vertex at the beginning of the polyline3d entity. The Managed Class Reference Guide suggest using Polyline3d.InsertVertexAt (ObjectId, PolylineVertex3d) or Polyline3d.InsertVertexAt (PolylineVertex3d, PolylineVertex3d) specifying NULL as the first parameters for both methods. But in this case I get NullReferenceException.
Does anybody have any ideas how to solve this problem? Thank you.
0 Likes
626 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Unfortunately, the managed class reference is a classic
example of the old axiom that says that if something is
not worth doing right, it's probably not worth doing at all.

The docs you're reading were translated from the native
API docs by someone that is relatively clueless, and with
little/no oversight by someone qualified to do that. Quite
possibly the fruit of 'that great talent at 1/5 the cost'.

Where it says 'pass NULL', you should interpret that to
mean ObjectId.Null, in the case where the parameter is
an ObjectId. The overload that takes an ObjectId is the
one you typically use for database-resident objects.

My advice to anyone who routinely finds themself stymied
by the managed API docs is to write Carl Bass a nice little
note suggesting that the people responsible for this trash
be reassigned to serve as 'roadies' for Shaan Hurley and
Lynn Allen.

--
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:6320348@discussion.autodesk.com...
Hello.
I need to insert vertex at the beginning of the polyline3d entity. The Managed
Class Reference Guide suggest using Polyline3d.InsertVertexAt (ObjectId,
PolylineVertex3d) or Polyline3d.InsertVertexAt (PolylineVertex3d,
PolylineVertex3d) specifying NULL as the first parameters for both methods. But
in this case I get NullReferenceException.
Does anybody have any ideas how to solve this problem? Thank you.
0 Likes
Message 3 of 3

azaytsev
Explorer
Explorer
Tony, great thanks for your help!
0 Likes