我试过这样的东西。。。
- Dim i As Integer
- Dim default As Integer
- Dim PName As String
- 'DirList1.Drive = "H:"
- 'DirList1.Path = "\Design_Office"
- 'DirList1.Pattern = "*.dwg"
- default = 0
- For i = 1 To UBound(ThisDrawing.ModelSpace.Layout.GetPlotDeviceNames)
- PName = ThisDrawing.ModelSpace.Layout.GetPlotDeviceNames(i)
- cmbPrinters.AddItem PName
- If PName = "PR03" Then default = i - 1
- Next
- cmbPrinters.ListIndex = default
- For i = 0 To UBound(ThisDrawing.ModelSpace.Layout.GetPlotStyleTableNames)
- cmbStyle.AddItem (ThisDrawing.ModelSpace.Layout.GetPlotStyleTableNames(i))
- Next
- cmbStyle.ListIndex = 0
- End Sub
|