memory 发表于 2008-1-22 13:04:00

[求助]小弟跪求高人帮忙,关于块的缩放问题~~

弄了好长时间了...怎么都搞不定.
1,选择图形名为"A"的图层中所有名字为"ss"开头的块,如SS-1,SS-2,SS-3...
2,将所有的块逐一以每个块中心点为basePoint缩放1.5个单位. 注意是每个块都以自己为中心点放大1.5个单位.
请问怎么实现.小弟跪求了!!!!
Set sset = ThisDrawing.SelectionSets.Add("block")
sset.Clear
Dim fType(0) As Integer
Dim fData(0) As Variant
fType(0) = 2
fData(0) = "*"
sset.SelectOnScreen fType, fData
...往下....

memory 发表于 2008-1-22 23:38:00

高手呀.你在哪里呀??

雪山飞狐_lzh 发表于 2008-1-22 23:43:00

object.ScaleEntity BasePoint, ScaleFactor
Object
,
The object or objects this method applies to.
BasePoint
Variant (three-element array of doubles); input-only
The 3D WCS coordinates specifying the base point.
ScaleFactor
Double; input-only
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.

qtds3386 发表于 2008-2-3 20:42:00

可以先建立选择集,然后建立过滤器,把名称为林SS*的所有块参照过滤出来,添加入选择集。然后用循环,得到每一个块参照的包围角点。以角点的连接线的中点做为基点,把块参照放大1.5倍。

gdzhou 发表于 2008-2-14 23:07:00

建立选择集,过滤选择层码为“A”,块名为“SS*”的块
循环,取插点PT1,由外框点求得中心点PT2,
如果两点不是同一点以点2为原点求出点1方向距离为1.5倍的点为块的新插入点位置否则插入点位置不变
设块X,Y,Z的比例为原来的1.5倍。Over
页: [1]
查看完整版本: [求助]小弟跪求高人帮忙,关于块的缩放问题~~