Originally Posted by
rkmcswain
If you want to avoid using "SendCommand", try this.
PHP Code:
Public Declare Function acedSetColorDialog Lib "acad.exe" (color As Long, ByVal bAllowMetaColor As Boolean, ByVal nCurLayerColor As Long) As Boolean
Sub example_usage()
On Error Resume Next
Dim blnMetaColor As Boolean
Dim lngCurClr As Long
Dim lngInitClr As Long
If acedSetColorDialog(lngInitClr, blnMetaColor, lngCurClr) Then
MsgBox lngInitClr
End If
End Sub
Update: For using with current AutoCAD, You need to add PtrSafe and change exe to accore.dll.
PHP Code:
Public Declare PtrSafe Function acedSetColorDialog Lib "accore.dll" (color As Long, ByVal bAllowMetaColor As Boolean, ByVal nCurLayerColor As Long) As Boolean