For AutoCAD 2013/2014, you need to use "AutoCAD.AcCmColor.19"
.
TrueColor property in VBA AutoCAD doesn't work
Question
I would like to change TrueColor property of a line object in AutoCAD 2013 using VBA.
I used the code which I found in Developer's guide, but it won't work.
The code is:
Dim VozniCrtaDesna As AcadLine
Set VozniCrtaDesna = ThisDrawing.ModelSpace.AddLine(Zero, KoncnaDesnaTocka)
Dim color As AcadAcCmColor
Set color = AcadApplication.GetInterfaceObject("AutoCAD.AcCmColor.16")
Call color.SetRGB(80, 100, 244)
VozniCrtaDesna.TrueColor = color
VozniCrtaDesna.Update
It throws an error:
Run-time error: '-2147221005 (800401f3)':
Problem in loading application
Any ideas what the problem would be?
Thanks. Špela
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow