Main Functions of the ArrangementCapture
Extension
-
Capture Image of the Arrangement:
- Allows capturing the image of an Arrangement component and saving it to the internal storage of the application.
-
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.
-
Get Dimensions of the Arrangement:
- Returns the dimensions (width and height) of the captured Arrangement component.
Events Triggered by the Extension
-
CaptureSucceeded:
- Triggered when the arrangement capture is successful.
- Parameter:
filePath
(String): The path where the captured image is saved.
-
CaptureFailed:
- Triggered when the arrangement capture fails.
- Parameter:
errorMessage
(String): The error message explaining why the capture failed.
-
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.
-
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.
- SetArrangement
- Description: Set the arrangement to capture.
- Parameters:
arrangement
(HVArrangement): The arrangement component to capture.
- 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.
- CaptureExists
- Description: Check if a capture exists.
- Parameters:
fileName
(String): The name of the file to check.
- DeleteCapture
- Description: Delete a capture.
- Parameters:
fileName
(String): The name of the file to delete.
- ListCaptures
- Description: List all captures.
- Parameters: None.
- RenameCapture
- Description: Rename a capture.
- Parameters:
oldName
(String): The current name of the file.newName
(String): The new name for the file.
- GetArrangementDimensions
- Description: Get dimensions of the arrangement.
- Parameters: None.
- GetFilePath
- Description: Get the file path of a capture.
- Parameters:
fileName
(String): The name of the file to get the path for.
- CaptureSucceeded
- Description: Triggered when the arrangement capture is successful.
- Parameters:
filePath
(String): The path where the captured image is saved.
- CaptureFailed
- Description: Triggered when the arrangement capture fails.
- Parameters:
errorMessage
(String): The error message explaining why the capture failed.
- 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.
- 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.