你好
下次我要做更好的搜索
答案就在我眼前:哎呀:
http://www.cadtutor.net/forum/showthread.php?t=29175
这是我从这个链接中提取的
- Sub PVPortScale()
- Dim strVpScaleStd As String
- Dim strVpScaleCust As String
- Dim Entity As AcadEntity
- Dim PVport As AcadPViewport
- Dim objLayout As AcadLayout
- Dim i As Integer
- For Each objLayout In ThisDrawing.Layouts
- If objLayout.Name <> "Model" Then
- ThisDrawing.ActiveLayout = objLayout
- ThisDrawing.MSpace = False
- For i = 1 To objLayout.Block.Count - 1 'avoid primary Paperspace PViewport
- Set Entity = objLayout.Block.Item(i)
- If TypeOf Entity Is AcadPViewport Then
- Set PVport = Entity
- strVpScaleStd = PVport.StandardScale
- strVpScaleCust = PVport.CustomScale
- If strVpScaleCust > 0 Then
- Exit For
- End If
- End If
- Next
- End If
- Next
- End Sub
现在我必须找出如何将结果与列表进行比较。该列表包含结果的对应关系
例如,如果strVpScaleStd=30,则我必须写入的刻度为3/32“=1'0”
祝你愉快! |