hicap Posted June 5, 2009 Share Posted June 5, 2009 Hi all Can any one share some code snippets to Add vertices to a baseline polyline when it intersects with another polyline in VBA? Thanks, Hicap. Quote Link to comment Share on other sites More sharing options...
SEANT Posted June 5, 2009 Share Posted June 5, 2009 This is not a trivial task with VBA. While it is possible to determine the WCS point of intersections, it requires quite a bit of custom code to insert a vertex at the appropriate spot. Other APIs (AutoLisp, ARX, .NET [or even VBA if AutoCAD Mechanical is available]) have the ability to query the polyline for the parameter value of a WCS point. This would have the information to properly place the vertex. A VBA routine would have to traverse each existing vertex to vertex span to see if it contains the point. This process is potentially tricky if the span is an arc (Bulge 0). Another possible VBA option is to use the “Curve.cls” (a web search should return a download location). This may have some problems with large data sets however. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.