『请教』对象选择的代码修改
<p>Sub 选择并移动()<br/>Dim SssObj As Object</p><p>Set SssObj = ThisDrawing.ModelSpace.Item(ThisDrawing.ModelSpace.Count - 1) '.<br/>Dim point1(0 To 2) As Double<br/>Dim point2(0 To 2) As Double<br/>point1(0) = 0: point1(1) = 0: point1(2) = 0<br/>point2(0) = 2: point2(1) = 0: point2(2) = 0<br/>' 移动圆<br/>SssObj.Move point1, point2<br/>这段代码只能对一个独立的基本图形进行移动。我想移动这个图层的全部图形代码该怎么改</p> 一个对象一个对象移。 <p>Sub 选择并移动()<br/>Dim SssObj As Object</p><p>Set SssObj = ThisDrawing.ModelSpace.Item(ThisDrawing.ModelSpace.Count - 1) '.<br/>Dim point1(0 To 2) As Double<br/>Dim point2(0 To 2) As Double<br/>point1(0) = 0: point1(1) = 0: point1(2) = 0<br/>point2(0) = 2: point2(1) = 0: point2(2) = 0<br/></p><p> dim entry as acadentry</p><p>for each entry in sssobj<br/>entry.Move point1, point2</p><p>next</p><p>选择集内的对象要一个一个来操作</p><p>帮你写上来吧!<br/></p>
页:
[1]