1、我修改明细栏的块属性:
atts = mGEntity.getAttributes
For i = LBound(atts) To UBound(atts)
att = atts(i)
If Not att Is Nothing Then
If dic.ContainsKey(att.TagString) Then
att.TextString = dic.Item(att.TagString)
End If
End If
Next
mGEntity.Update()
当原来属性值不为空时,修改后属性显示字体和系统字体一致,为空时修改,字体就变宽了。
2、我在图中拖动一个序号,自动生成序号元素,并生成明细栏列表。用修改块属性的方法可以修改明细栏,但是不能修改序号元素的属性,就造成序号元素和明细栏属性不一致。因为不是块,getAttributes方法不能获取东西。请问怎么修改。
Dim ent As GcadEntity
Dim sonEnt As GcadEntity
Dim app As GcadApplication = GetObject(, m_GcadVer)
For Each ent In app.ActiveDocument.ModelSpace
If ent.ObjectName = "HC_XuHaoEntity" Then
MsgBox(ent.ObjectName)
'Dim db As ent.dab
'Dim frm As New FormAttributes(ent)
'frm.ShowDialog()
End If
Next
End Sub