做Autocad二次开发(VBA语言)的大侠帮忙写段小程序!!!

2024-11-22 09:31:02
推荐回答(1个)
回答1:

Dim allEnt As AcadEntity
Dim CONEnt As AcadEntity
Dim HIDEnt As AcadEntity

For Each allEnt In ThisDrawing.ModelSpace

If allEnt.Linetype = "CONTINUOUS" Then
Set CONEnt = allEnt
CONEnt.Layer = "0"
CONEnt.TrueColor.ColorIndex = acByLayer
CONEnt.Lineweight=acLnWtByLayer
End If

If allEnt.Linetype = "HIDDEN" Then
Set HIDEnt = allEnt
HIDEnt.Layer = "4"
HIDEnt.TrueColor.ColorIndex = acByLayer
HIDEnt.Lineweight=acLnWtByLayer
End If

Next allEnt