1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- Attribute VB_Name = "Tools"
- Public Function Simple_Train_Arrangement(Space_Width As Double)
- API.BeginOpt
- Dim ssr As ShapeRange, s As Shape
- Dim cnt As Integer
- Set ssr = ActiveSelectionRange
- cnt = 1
- #If VBA7 Then
- ssr.Sort " @shape1.left<@shape2.left"
- #Else
- Set ssr = X4_Sort_ShapeRange(ssr, stlx)
- #End If
- ActiveDocument.ReferencePoint = cdrTopLeft
- For Each s In ssr
-
-
- ActiveDocument.ReferencePoint = cdrTopLeft + cdrBottomTop
- If cnt > 1 Then s.SetPosition ssr(cnt - 1).RightX + Space_Width, ssr(cnt - 1).TopY
- cnt = cnt + 1
- Next s
- API.EndOpt
- End Function
- Public Function Simple_Ladder_Arrangement(Space_Width As Double)
- API.BeginOpt
- Dim ssr As ShapeRange, s As Shape
- Dim cnt As Integer
- Set ssr = ActiveSelectionRange
- cnt = 1
- #If VBA7 Then
- ssr.Sort " @shape1.top>@shape2.top"
- #Else
- Set ssr = X4_Sort_ShapeRange(ssr, stty).ReverseRange
- #End If
- ActiveDocument.ReferencePoint = cdrTopLeft
- For Each s In ssr
- If cnt > 1 Then s.SetPosition ssr(cnt - 1).LeftX, ssr(cnt - 1).BottomY - Space_Width
- cnt = cnt + 1
- Next s
- API.EndOpt
- End Function
|