Удалить поля
Contents
[
Hide
]
Удалить поле
Aspose.Diagram для Python via Java позволяет удалить поля для Microsoft Visio диаграмм из ваших собственных приложений без автоматизации.
Объект Field представляет собой текстовое поле в текстовом прогоне. Свойство field, предоставляемое классом Shape, поддерживает набор объектов Aspose.Diagram.Field.
Образец программирования
Следующий фрагмент кода удаляет поле в форме.
This file contains 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
import jpype | |
import asposediagram | |
jpype.startJVM() | |
from asposediagram.api import * | |
lic = License() | |
lic.setLicense("Aspose.Total.Product.Family.lic") | |
# load a Visio diagram | |
diagram = Diagram("InsertField_out.vsdx") | |
# Get page by name | |
page = diagram.getPages().getPage("Page-1") | |
# Get Visio Shape | |
shape = page.getShapes().get(0) | |
fld = shape.getFields().get(0) | |
# Remove field of shape | |
shape.getFields().remove(fld) | |
# Save diagram | |
diagram.save("RemoveField_out.vsdx", SaveFileFormat.VSDX) | |
jpype.shutdownJVM() |