Jump to content

Add Vertex


hicap

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...