Dim plineobj As AcadLWPolyline Dim points(0 To 3) As Double points(0) =0+textbox1: points5(1) = 0 points(2) = 100: points5(3) = 0 Set plineobj = ThisDrawing.ModelSpace.AddLightWeightPolyline(points)
Dim pline1obj As AcadLWPolyline Dim points1(0 To 3) As Double points1(0) =200: points1(1) = 200 points1(2) = 500: points1(3) = 500 Set pline1obj = ThisDrawing.ModelSpace.AddLightWeightPolyline(points1)
。。。。。。
以上程序运行时,如何在textbox1=" "时,程序跳过plineobj,继续执行下面的程序
if textbox1.text<>"" then
points(0) =0+textbox1: points5(1) = 0 points(2) = 100: points5(3) = 0 Set plineobj = ThisDrawing.ModelSpace.AddLightWeightPolyline(points)
end if
Dim plineobj As AcadLWPolyline Dim points(0 To 3) As Double points(0) =0+textbox1: points5(1) = 0-->points(0) =iif(isnumeric),------->textbox1.text),textbox1.text,0) points(2) = 100: points5(3) = 0 Set plineobj = ThisDrawing.ModelSpace.AddLightWeightPolyline(points)