有没有一种不同的方法可以在AutoCAD 2013 VBA中调用ACI(AutoCAD颜色索引)颜色对话框?
下面的代码在AutoCAD 2004〜2012
中运行良好,但在AutoCAD 2013中不起作用。
- Option Explicit
- Public Declare Function acedSetColorDialog Lib "acad.exe" _
- (color As Long, _
- ByVal bAllowMetaColor As Boolean, _
- ByVal nCurLayerColor As Long) As Boolean
- Sub GetACIColor()
- Dim iColor As Integer
- iColor = GetColorFromDlg(1, True, 256)
- MsgBox iColor
- End Sub
- Function GetColorFromDlg(ByVal initColor As Long, ByVal bAllowMetaColor As Boolean, ByVal nCurLayerColor As Long) As Long
- GetColorFromDlg = -1
- On Error Resume Next
- If acedSetColorDialog(initColor, bAllowMetaColor, nCurLayerColor) Then
- GetColorFromDlg = initColor
- End If
- End Function
本帖以下内容被隐藏保护;需要你回复后,才能看到! 游客,如果您要查看本帖隐藏内容请 回复 |