- 积分
- 255
- 明经币
- 个
- 注册时间
- 2004-7-23
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
楼主 |
发表于 2004-12-2 16:07:00
|
显示全部楼层
<BR> Call MoveLineBlockObject(BlockRef, ObjectLine, iDocIndex)<BR> <BR> BlockRef.Explode <BR> BlockRef.Delete
--------------------------------------------------------------------------<BR>ublic Sub MoveLineBlockObject(ByVal BlockRef As AcadBlockReference, ByVal ObjectLine As TCollection, ByVal iIndexBlock As Integer)<BR> On Error Resume Next<BR>
Plb = ObjectLine.BlockLeftBottom<BR> Prt = ObjectLine.BlockRightTop<BR>
ScaleRT = ObjectLine.ScaleRightTop<BR> ScaleLB = ObjectLine.ScaleLeftBottom<BR> <BR> <BR> If ObjectLine.ObjectType = m_SillObject Then<BR> If (ObjectLine.SpecialObjType > 0) And (ObjectLine.SpecialObjType Mod 2 = 0) Then<BR> pEndMove(0) = xBlockLeft + 800 - 200<BR> Else<BR> pEndMove(0) = xBlockLeft + 400 - 200<BR> End If<BR> pEndMove(1) = xBlockTop + 400 + 250<BR> Else<BR> pEndMove(0) = 1050<BR> pEndMove(1) = 1500 - ObjectLine.Height / 2 / dbScaleFactor<BR> End If<BR>
If (ObjectLine.ObjectType = m_NormalObject) And _<BR> (ObjectLine.SpecialObjType = m_NormalObjRectangle) Then<BR> Dim xInsertPoint As Variant<BR> xInsertPoint = BlockRef.InsertionPoint<BR> MoveBasePoint(0) = xInsertPoint(0)<BR> MoveBasePoint(1) = xInsertPoint(1)<BR> <BR> pEndMove(0) = xBlockLeft + 400<BR> pEndMove(1) = xBlockTop + 0<BR> ElseIf ObjectLine.ObjectType = m_NormalObject And ObjectLine.ColyModelLineObj.IsEspecialMdl Then<BR> MoveBasePoint(0) = (ScaleRT(0) + ScaleLB(0)) / 2<BR> MoveBasePoint(1) = ScaleLB(1) - 150<BR> Else<BR> MoveBasePoint(0) = (ScaleRT(0) + ScaleLB(0)) / 2<BR> MoveBasePoint(1) = ScaleLB(1)<BR> End If<BR>
If ObjectLine.ObjectType = m_ChiNoObject Then<BR> MoveChiNoObj ObjectLine, MoveBasePoint<BR> End If<BR>
<BR> ((((()))))<BR>
BlockRef.Move MoveBasePoint, pEndMove<BR> <BR>End Sub
我把EXPLODE放到引用的MOVE语句前就能炸开,位置在((((()))))处
其后就不行,对有些图形且是CAD2004,2005不行 |
|