ArrangementCapture - Set the arrangement to capture.

Main Functions of the ArrangementCapture Extension

  1. Capture Image of the Arrangement:

    • Allows capturing the image of an Arrangement component and saving it to the internal storage of the application.
  2. Operations with Captures:

    • Check Existence: Verifies if a capture with a specific name exists in the internal storage.
    • Delete Captures: Allows deleting saved captures.
    • List Captures: Returns a list of the names of all saved captures.
    • Rename Captures: Allows renaming saved captures.
    • Get File Path: Provides the complete path of a capture in the internal storage.
  3. Get Dimensions of the Arrangement:

    • Returns the dimensions (width and height) of the captured Arrangement component.

Events Triggered by the Extension

  1. CaptureSucceeded:

    • Triggered when the arrangement capture is successful.
    • Parameter: filePath (String): The path where the captured image is saved.
  2. CaptureFailed:

    • Triggered when the arrangement capture fails.
    • Parameter: errorMessage (String): The error message explaining why the capture failed.
  3. CaptureDeleted:

    • Triggered when a capture is deleted.
    • Parameters:
      • success (boolean): Indicates if the file was deleted successfully.
      • message (String): A message describing the result of the deletion.
  4. CaptureRenamed:

    • Triggered when a capture is renamed.
    • Parameters:
      • success (boolean): Indicates if the file was renamed successfully.
      • message (String): A message describing the result of the renaming.

  1. SetArrangement
    • Description: Set the arrangement to capture.
    • Parameters:
      • arrangement (HVArrangement): The arrangement component to capture.

  1. CaptureArrangement
    • Description: Capture the image of the specified Arrangement and save it to the specified fileName.
    • Parameters:
      • fileName (String): The name of the file to save the captured image.

component_method (3)

  1. CaptureExists
    • Description: Check if a capture exists.
    • Parameters:
      • fileName (String): The name of the file to check.

component_method (4)

  1. DeleteCapture
    • Description: Delete a capture.
    • Parameters:
      • fileName (String): The name of the file to delete.

component_method (7)

  1. ListCaptures
    • Description: List all captures.
    • Parameters: None.

  1. RenameCapture
    • Description: Rename a capture.
    • Parameters:
      • oldName (String): The current name of the file.
      • newName (String): The new name for the file.

  1. GetArrangementDimensions
    • Description: Get dimensions of the arrangement.
    • Parameters: None.

component_method (6)

  1. GetFilePath
    • Description: Get the file path of a capture.
    • Parameters:
      • fileName (String): The name of the file to get the path for.

  1. CaptureSucceeded
    • Description: Triggered when the arrangement capture is successful.
    • Parameters:
      • filePath (String): The path where the captured image is saved.

component_event (5)

  1. CaptureFailed
    • Description: Triggered when the arrangement capture fails.
    • Parameters:
      • errorMessage (String): The error message explaining why the capture failed.

  1. CaptureDeleted
    • Description: Triggered when a capture is deleted.
    • Parameters:
      • success (boolean): Indicates if the file was deleted successfully.
      • message (String): A message describing the result of the deletion.

  1. CaptureRenamed
    • Description: Triggered when a capture is renamed.
    • Parameters:
      • success (boolean): Indicates if the file was renamed successfully.
      • message (String): A message describing the result of the renaming.

Video example:


aia project:

ArrangementCaptureTest.aia (288.7 KB)


Extension:

ArrangementCapture.aix (9.4 KB)


Thanks.

5 Likes

You missed out the (all important...) SetArrangement block (item #1)

It's true, you're right, I lost my mind, in a few hours after I get home I will put that block, thank you.