在 AutoCAD 绘图中收集实体并更改颜色

Collect Entities in autoCAD drawing and change the colors

The code i tried line collection under entity collection我想使用 VBA 在 autocad 绘图中更改不同线型(连续/虚线/中心)的颜色/图层。我试图收集所有实体并过滤它们!但没有成功!

明白了!我不得不使用 Iacadline2 而不是收集线型,然后根据名称进行过滤。 代码现在可以正常工作了。