Dear All
I used following code to change the colour of Line in AutoCAD 2013 32-bit.
Sub Ch4_ColorCircle()
Dim color As New AcadAcCmColor
Call color.SetRGB(80, 100, 244)
Dim circleObj As AcadCircle
Dim centerPoint(0 To 2) As Double
Dim radius As Double
centerPoint(0) = 0#: centerPoint(1) = 0#: centerPoint(2) = 0#
radius = 5#
Set circleObj = ThisDrawing.ModelSpace.AddCircle(centerPoint, radius)
circleObj.TrueColor = color
ZoomAll
End Sub
The program worked nicely.
but when I ran the program in AutoCAD 2013 64-bit I got following message for code (Call color.SetRGB(80, 100, 244))
Automation Error
%1 is not a valid Win32 application.
Can any help solve this problem. Is this problem related to 64-bit AutoCAD.
Hi,
if you change your first line with Dim .... to that:
Dim color As AcadAcCmColor
Set color = ThisDrawing.Application.GetInterfaceObject("AutoCAD.AcCmColor.19")
Does that work?
- alfred -