[求助]小弟跪求高人帮忙,关于块的缩放问题~~
<p>弄了好长时间了...怎么都搞不定.</p><p>1,选择图形名为"A"的图层中所有名字为"ss"开头的块,如SS-1,SS-2,SS-3...<br/>2,将所有的块逐一以每个块中心点为basePoint缩放1.5个单位. 注意是每个块都以自己为中心点放大1.5个单位.</p><p>请问怎么实现.小弟跪求了!!!!</p><p><br/>Set sset = ThisDrawing.SelectionSets.Add("block")</p><p>sset.Clear</p><p></p><p>Dim fType(0) As Integer<br/>Dim fData(0) As Variant</p><p>fType(0) = 2<br/>fData(0) = "*"</p><p><br/>sset.SelectOnScreen fType, fData</p><p>...往下....<br/></p> 高手呀.你在哪里呀?? <p class="syntax">object.ScaleEntity BasePoint, ScaleFactor </p><p class="element">Object</p><p class="element-desc"><a href="mk:@MSITStore:D:\Program%20Files\AutoCAD%202008\help\acadauto.chm::/all_drawing_objects.htm">All Drawing Objects</a>, <a href="mk:@MSITStore:D:\Program%20Files\AutoCAD%202008\help\acadauto.chm::/idh_attributeref_object.htm">AttributeReference</a><br/>The object or objects this method applies to. </p><p class="element">BasePoint</p><p class="element-desc">Variant (three-element array of doubles); input-only<br/>The 3D WCS coordinates specifying the base point. </p><p class="element">ScaleFactor</p><p class="element-desc">Double; input-only<br/>The factor by which to scale the object. The dimensions of the object are multiplied by the scale factor. A scale factor greater than 1 enlarges the object. A scale factor between 0 and 1 reduces the object. The scale factor must be greater than 0.0. </p> 可以先建立选择集,然后建立过滤器,把名称为林SS*的所有块参照过滤出来,添加入选择集。然后用循环,得到每一个块参照的包围角点。以角点的连接线的中点做为基点,把块参照放大1.5倍。 <p>建立选择集,过滤选择层码为“A”,块名为“SS*”的块</p><p>循环,取插点PT1,由外框点求得中心点PT2,</p><p>如果两点不是同一点以点2为原点求出点1方向距离为1.5倍的点为块的新插入点位置否则插入点位置不变</p><p>设块X,Y,Z的比例为原来的1.5倍。Over</p>
页:
[1]