本帖最后由 zzyong00 于 2015-2-8 00:01 编辑
charlesli8 发表于 2015-2-7 12:36
不管多少明经币 不是钱数的问题 是行不行的问题。 想的话谁都会想。我写了3页的代码 发现还是有很多问题 ...
随你的意思吧!
主要模块:
偏移四边形.zip(等待你的20个币),
主要调用sub:OffsetQuadrangle (针对凸四边形)
调用代码:
- Private Sub Command1_Click()
- Dim objSset As AcadSelectionSet
- Dim objDoc As AcadDocument
- Set objDoc = ThisDrawing()
- AppActivate objCad.Caption
- SelectLots "MEA~PL~TMP~123", "lwpolyline"
- Set objSset = objDoc.SelectionSets("MEA~PL~TMP~123")
- If objSset.Count = 0 Then Exit Sub
- Dim i As Long, objRetPl As AcadLWPolyline, offDist(3) As Double
- offDist(0) = 5
- offDist(1) = 10
- offDist(2) = 15
- offDist(3) = 20
- ' offDist(0) = -5 '向内侧偏移
- ' offDist(1) = -10
- ' offDist(2) = -15
- ' offDist(3) = -20
- '
- For i = 0 To objSset.Count - 1
- OffsetQuadrangle objSset.Item(i), offDist, objRetPl
- Next i
- End Sub
没有的函数、方法,还请参见我的哪个帖子:http://bbs.mjtd.com/thread-111783-1-1.html
|