Verbinden Sie Punkte von der Form abrufen
Contents
[
Hide
]
Aspose.Cells für Python via .NET bietet umfangreiche Funktionen zur Verwaltung von Formen in Tabellen. Manchmal ist es notwendig, die Verbindungspunkte einer Form für die Ausrichtung oder das Platzieren der Formen an der richtigen Stelle zu erhalten. Zu diesem Zweck sind alle Verbindungspunkte erforderlich. Der folgende Code kann verwendet werden, um die Liste der Verbindungspunkte einer Form mit der Eigenschaft Shape.ConnectionPoints abzurufen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from aspose.cells import Workbook | |
# Instantiate a new Workbook. | |
workbook = Workbook() | |
# Get the first worksheet in the book. | |
worksheet = workbook.worksheets[0] | |
# Add a new textbox to the collection. | |
textboxIndex = worksheet.text_boxes.add(2, 1, 160, 200) | |
# Access your text box which is also a shape object from shapes collection | |
shape = workbook.worksheets[0].shapes[0] | |
# Get all the connection points in this shape | |
ConnectionPoints = shape.get_connection_points() | |
# Display all the shape points | |
for pt in ConnectionPoints: | |
print("X = " + str(pt[0]) + ", Y = " + str(pt[1])) |