|
发表于 2015-6-2 16:10:00
|
显示全部楼层
代码如下:
Dim aPNT As ACAD_POINT
Dim bPNT As ACAD_POINT
Dim cLine As AcadLine
Dim B1 As AcadLine
Dim B2 As AcadLine
Dim B As Double 'áoμÄ¿í¶è
B = ThisDrawing.Utility.GetReal("áoμÄ¿í¶è£o")
aPNT = ThisDrawing.Utility.GetPoint(, "êäèëÆeμã£o")
bPNT = ThisDrawing.Utility.GetPoint(aPNT, "ÖÕμã£o")
Set cLine = ThisDrawing.ModelSpace.AddLine(aPNT, bPNT)
With cLine
.Lineweight = acLnWt100
.color = acGreen
.Update
End With
Set B1 = cLine.Offset(B / 2)
With B1
.Lineweight = acLnWt000
.color = acRed
.Update
End With
B2 = cLine.Offset(-B / 2)
With B1
.Lineweight = acLnWt000
.color = acRed
.Update
End With |
|