您可以更改圆弧的角度,也可以更改开放线、圆弧、开放折线、椭圆圆弧和开放样条曲线的长度。结果类似于延伸和修剪对象。 您可以通过编辑对象的属性来扩展或修剪对象。例如,要延长一条线,只需更改 or 属性的坐标即可。若要更改圆弧的角度,请更改圆弧的 or 属性。更改对象的一个或多个属性后,请使用该方法在图形中查看更改。StartPointEndPointStartAngleEndAngleUpdate 加长一条线此示例创建一条线,然后更改该线的终结点,从而生成更长的线。 Sub Ch4_LengthenLine() ' Define and create the line Dim lineObj As AcadLine Dim startPoint(0 To 2) As Double Dim endPoint(0 To 2) As Double startPoint(0) = 0 startPoint(1) = 0 startPoint(2) = 0 endPoint(0) = 1 endPoint(1) = 1 endPoint(2) = 1 Set lineObj = ThisDrawing.ModelSpace.AddLine(startPoint, endPoint) lineObj.Update ' Lengthen the line by changing the ' endpoint to 4, 4, 4 endPoint(0) = 4 endPoint(1) = 4 endPoint(2) = 4 lineObj.endPoint = endPoint lineObj.Update End Sub 父主题: |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:09
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.