Pregunta

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

¿Fue útil?

Solución

For AutoCAD 2013/2014, you need to use "AutoCAD.AcCmColor.19".

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top