vb 判断CAD线型是否已加载的函数问题
<p><font color="#369636">Public Function Findlt(LineTypeName As String) As Boolean<br/>Findlt = False<br/>For Each entry In acadDoc.Linetypes<br/> If StrComp(entry.Name, LineTypeName) = 0 Then<br/> Findlt = True '标志为已找到线型<br/> Exit For '退出循环<br/> End If<br/>Next entry '结束循环<br/>End Function</font></p><p><font color="#0909f7">For Each entry In acadDoc.Linetypes</font> <font color="#ff0000"> '这句有要求对象的错误</font></p> <p>定义entry了吗?dim entry as object</p><p>另外一般好像习惯用entity或者element等。</p><p></p> <font color="#ff0033">定义了,也不行啊,再帮我看看啊</font> <p>换种方法吧,</p><p>for i =0 to x</p><p>linetypes.item(i)</p><p>next</p>
页:
[1]