Lavorare con la protezione

Set Protezione del Visio Diagram

Protecting diagrams allow users to lock backgrounds, masters (stencils), shapes and styles so that they cannot be edited. This is useful for protecting corporate styles, for example, and ensure a consistent look across a set of diagrams. Developers can achieve this using Aspose.Diagram for Python via Java.

Modifica protezione del Visio Diagram

I metodi getProtectBkgnds, getProtectMasters, getProtectShapes e getProtectStyles, esposti dalla classe DocumentSettings, supportano l’oggetto BoolValue. Queste proprietà possono essere utilizzate per proteggere e sproteggere i diagrammi Microsoft Visio.

In Microsoft Visio proteggi i documenti in questo modo:

  1. Apri uno diagram in Microsoft Visio.
  2. Apre la finestra Esplora Disegno.
  3. Fare clic con il tasto destro su diagram e selezionareProteggi documento dal menù.
  4. Nella finestra Proteggi documento, seleziona o deseleziona le opzioni per bloccare o sbloccare diversi elementi diagram.
  5. ClicOK.

Si prega di vedere come possiamo controllare o cancellare le opzioni manualmente.

Use the code below in your application to perform the same tasks – lock and unlock different elements of your diagram – using Aspose.Diagram for Python via Java.

Modifica la protezione della forma Visio

Protecting Visio shapes allow users to lock specific aspects of shapes. Aspects of shapes that can be locked through shape protection include width, height, x-position, y-position, rotation and more. Developers can achieve this using Aspose.Diagram for Python via Java.

IlgetBloccoAspetto(), getLockBegin(), getBloccoCalcWH(), getBloccoRitaglia(), getLockCustProp(), getLockDelete(), getBloccoFine(), getBloccoFormato(), getBloccoDaFormatoGruppo(), getBloccoGruppo(), getBloccoAltezza(), getBloccaSpostaX(), getBloccoSpostaY(), getBloccaRuota(), getBloccoSeleziona(), getLockTextEdit(), getBloccoTemaColori(), getLockThemeEffects(), getLockVtxEdit() egetLockWidth() metodi esposti dalProtezione class supportano l’oggetto BoolValue. Questi metodi possono essere utilizzati per proteggere/sproteggere le forme.

In Visio, è necessario eseguire le seguenti azioni per proteggere qualsiasi forma:

  1. Apri uno diagram in Microsoft Visio.
  2. Seleziona una forma.
  3. SelezionareProtezione dalFormato menu (Visio 2007), o selezionareProtezione dalSviluppatore menù (Visio 2010).
  4. NelProtezione finestra, selezionare o deselezionare le opzioni per bloccare o sbloccare l’attributo della forma.
  5. ClicOK.

Le opzioni di protezione di una forma, come si vede in Microsoft Visio

Use the following code in your Java application to do the same thing (lock/unlock any shape attribute) using Aspose.Diagram for Python via Java.