AutoCAD 2013 VBA中的ACI颜色对话框
有没有一种不同的方法可以在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
**** Hidden Message *****
页:
[1]