如何在VBA修改LINETYPE GENARATION的属性值!
如何在VBA对选择的多段线修改LINETYPE GENARATION的属性值! LinetypeGenerationBoolean; read-write
TRUE: Generates the linetype in a continuous pattern through the polyline vertices.
FALSE: Generates the linetype starting and ending with a dash at each polyline vertex.
Remarks
This property does not apply to polylines with tapered segments.
A polyline with linetype generation set to true (left) and set to false (right)
区别就在交点处吧,为True时是使用连续的线型,为False使用点做为开始和结束的分隔。 斑竹,可是我图中有一些多段线在LinetypeGeneration为DISNABLE时总是显示不正确,而我将LinetypeGeneration改成ENABLED,就能正确显示。
希望能够修改这属性来解决这问题。
谢谢!
Sub kkk()
Dim acaddoc As AcadDocument
Dim selectset1 As AcadSelectionSet
Set acaddoc = ThisDrawing
On Error Resume Next
Set selectset1 = acaddoc.SelectionSets("kkk")
If Err Then
Set selectset1 = acaddoc.SelectionSets.Add("kkk")
End If
selectset1.SelectOnScreen
Dim entry As AcadEntity
For Each entry In selectset1
If entry.ObjectName = "AcDbPolyline" Then
entry.LinetypeGeneration = True
End If
Next entry
selectset1.Clear
End Sub
页:
[1]