Is there a different way to call the ACI(AutoCAD Color Index) color dialog in AutoCAD 2013 VBA?
below code is working very well in AutoCAD 2004 ~ 2012
but not working in 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