我正在尝试从两个给定点绘制一条折线,并遵循一条特定路径(另一条折线),否则这两条折线将与VBA AutoCAD或qgis叠加
Sub draw_polyline1()
Dim lineobj As AcadLine
Dim entite As AcadEntity
Dim ptd As Variant
Dim pta As Variant
ThisDrawing.Utility.GetEntity entite, ptClique, "select the path to follow"
ptd = ThisDrawing.Utility.GetPoint(, "select the start point")
pta = ThisDrawing.Utility.GetPoint(, "select the end point")
Set lineobj = ThisDrawing.ModelSpace.AddPolyline(entite, ptd, pta)
ZoomExtents
End Sub
蓝线是路径,红线是我要在2个点(模式中的星星)之间自动绘制的折线
答案 0 :(得分:0)
我认为最简单的方法是克隆您要遵循的路径,并在点击点之外“剪切”结尾。要进行切割,可以使用_break命令,然后检查新曲线中的哪一条在选定点上具有起点和终点。