[求助]在vba中直接寫類似eattedit修改attribute?
<p>acadBlock中可以用getAttributes把 attribute.textString抓出或修改,</p><p>怎麼改修attribute.Height?</p><p>同樣acadBlock建二個acadBlockReference,(a) (B)</p><p>(a) (B)各有不同attribute.textString顯示,</p><p>若想要改(a)attribute.height=8而(B)attribute.height=6</p><p>請問前輩大致步驟,</p><p>圖面操作以eattedit指令,選第二頁Text Options ->height可以分別設定</p><p></p> <p>以下是个简单的测试程序:</p><p>Sub at()<br/> Dim ent As AcadEntity<br/> Dim pnt As Variant<br/> Dim tm As Variant<br/> Dim con As Variant<br/> <br/> ThisDrawing.Utility.GetSubEntity ent, pnt, tm, con, "请选择对象"<br/> If ent.ObjectName = "AcDbAttribute" Then ent.Height = 8<br/>End Sub</p> 同意明总又學了一招,謝謝大大
<p>天天都向大家問出一招,</p><p>有一天我會很强,天都睛了前途豁然開朗,</p><p>謝謝大大</p><p></p>很難想到用GetSubEntity,再次感謝
<p> 本來只會GetEntity,怎麼都抓到AcDbBlockReference快瘋掉,</p><p>網上範例很少寫到GetSubEntity,</p><p>autodesk的"ActiveX and VBA reference"寫的我看不懂 </p><p>如果不是大大慷慨賜教,還在裡頭打轉,</p><p>再次感謝</p>
页:
[1]