### AVEVA Query Command Syntax Examples Source: https://docs.aveva.com/bundle/e3d-design/page/1128742 Illustrates the syntax for common commands used in AVEVA's Query language, such as CLOSE, DELIMIT, GET, OPEN, SEND, START, and TOGGLE. ```query CLOSE "ConnectionName" DELIMIT "DelimiterString" END EXTERNAL "ExternalCommand" GET "CommandAlias" RESPONSE AS "ResponseAlias" OPEN "ConnectionName" CONNECTION "ConnectionString" SEND "CommandString" AS "CommandAlias" START "ProcessName" TOGGLE "FlagName" ``` -------------------------------- ### Query Commands for Data Server Source: https://docs.aveva.com/bundle/e3d-design/page/990797 Provides examples of sending commands to a data server using the Query language. This includes commands like CLOSE, DELIMIT, GET, OPEN, SEND, START, and TOGGLE. ```query SEND 'GET "PMP" ALL' CLOSE START TOGGLE DELIMIT '|' ``` -------------------------------- ### Query Command Examples Source: https://docs.aveva.com/bundle/e3d-design/page/1041949 Provides examples of common Query commands used for interacting with the AVEVA E3D database. These commands include opening, closing, getting, sending data, and toggling system states. ```query OPEN GET "SYSTEM" SEND "SET VARIABLE MYVAR = 10" TOGGLE "FLOW" DELIMIT "PIPE" "001" CLOSE ``` -------------------------------- ### Query Commands for Data Server Interaction Source: https://docs.aveva.com/bundle/e3d-design/page/1042965 Provides examples of Query commands used to interact with a data server, including opening, closing, sending data, and retrieving information. These commands are essential for environmental setup and data manipulation. ```query OPEN DATABASE "DatabaseName"; SEND "SET VARIABLE MYVAR = 10"; GET ATTRIBUTE "ElementName" "AttributeName"; CLOSE DATABASE; ``` -------------------------------- ### AVEVA E3D Command: START Source: https://docs.aveva.com/bundle/e3d-design/page/1001371 Details the 'START' command in AVEVA E3D Query reference. This command is used to initiate processes, applications, or specific functionalities. ```query START "ISODRAFT" -- Starts the ISODRAFT application. ``` -------------------------------- ### Laser Reference Driver Subcommand Example Source: https://docs.aveva.com/bundle/e3d-design/page/990797 Illustrates a conceptual example of using a driver subcommand to access laser referencing capabilities. This is a placeholder for actual command syntax. ```command LASER DRIVER SUBCOMMAND "AccessDrivers" ``` -------------------------------- ### Integrator Command Line Usage Source: https://docs.aveva.com/bundle/e3d-design/page/1024116 Guides on using the Integrator from the command line, including object initialization and method calls for comparison and difference acceptance. ```APIDOC ## Integrator Object Initialization ### Description Initializes Integrator objects for command-line operations. ### Method POST ### Endpoint /websites/aveva_bundle_e3d-design/integrator/cli/initialize ### Parameters #### Request Body - **projectPath** (string) - Required - The path to the Integrator project. ### Request Example ```json { "projectPath": "/path/to/my/project" } ``` ### Response #### Success Response (200) - **sessionId** (string) - A unique session ID for the initialized Integrator instance. #### Response Example ```json { "sessionId": "session_abc123" } ``` ## Integrator Object Methods - Comparison Summary ### Description Retrieves a summary of comparison results using Integrator object methods. ### Method GET ### Endpoint /websites/aveva_bundle_e3d-design/integrator/cli/methods/comparison-summary ### Parameters #### Query Parameters - **sessionId** (string) - Required - The session ID obtained from initialization. ### Response #### Success Response (200) - **summary** (object) - Contains details about the comparison results (e.g., differences count, matching elements). #### Response Example ```json { "summary": { "differences": 5, "matches": 100, "newElements": 2 } } ``` ## Integrator Object Methods - Accept Differences ### Description Accepts identified differences using Integrator object methods. ### Method POST ### Endpoint /websites/aveva_bundle_e3d-design/integrator/cli/methods/accept-differences ### Parameters #### Request Body - **sessionId** (string) - Required - The session ID. - **differenceIds** (array) - Optional - A list of specific difference IDs to accept. If omitted, all differences may be considered. ### Request Example ```json { "sessionId": "session_abc123", "differenceIds": ["DIFF001", "DIFF005"] } ``` ### Response #### Success Response (200) - **status** (string) - The status of the accept differences operation. - **message** (string) - A message indicating the outcome. #### Response Example ```json { "status": "success", "message": "Differences accepted successfully." } ``` ``` -------------------------------- ### PML Example: Set and Get Status Data using Core Objects Source: https://docs.aveva.com/bundle/e3d-design/page/1001371 Illustrates setting and getting status data utilizing core PML objects like STATUSMANAGEMENT and STATUSVALUE. This provides a foundational approach to status manipulation. ```PML DECLARE STATUSMANAGEMENTPROGRAMMY L_STATUSMGMT DECLARE STATUSVALUEPROGRAMMY L_STATUSVALUE DECLARE ASSIGNEDSTATUSPROGRAMMY L_ASSIGNEDSTATUS // Example to set status data L_STATUSVALUE.Name = "MyCustomStatus" L_STATUSVALUE.Value = "Approved" L_ASSIGNEDSTATUS.StatusValue = L_STATUSVALUE L_STATUSMGMT.AssignStatus(L_ASSIGNEDSTATUS) // Example to get status data DECLARE STRING L_CURRENTSTATUS L_CURRENTSTATUS = L_STATUSMGMT.GetStatus("MyCustomStatus") PRINT "Current Status: " + L_CURRENTSTATUS ``` -------------------------------- ### Flexible Explorer Control Sample Addin Source: https://docs.aveva.com/bundle/e3d-design/page/1024052 Provides an example of a Flexible Explorer add-in, demonstrating its structure and how it can be defined using XML files. This allows for customizable and dynamic exploration of project data. ```xml ``` -------------------------------- ### PML Example: Set and Get Status Data Source: https://docs.aveva.com/bundle/e3d-design/page/1001371 Demonstrates how to set and retrieve status data using the StatusData PML object. This is useful for custom status control logic within AVEVA E3D Design. ```PML DECLARE STATUSDATAPROGRAMMY L_STATUSDATA // Example to set status data L_STATUSDATA.SetStatus("MyStatus", "Active") // Example to get status data DECLARE STRING L_CURRENTSTATUS L_CURRENTSTATUS = L_STATUSDATA.GetStatus("MyStatus") PRINT "Current Status: " + L_CURRENTSTATUS ``` -------------------------------- ### PML Example: Setting and Getting Status Data Source: https://docs.aveva.com/bundle/e3d-design/page/1041949 This PML code snippet demonstrates how to set and retrieve status data for an object within AVEVA E3D Design. It utilizes the StatusData PML object and assumes the necessary context for accessing object properties. ```PML ::SET STATUSDATA OBJECT "MY_OBJECT_NAME" PROPERTY "MY_STATUS_PROPERTY" VALUE "MY_STATUS_VALUE" ::GET STATUSDATA OBJECT "MY_OBJECT_NAME" PROPERTY "MY_STATUS_PROPERTY" VAR "myStatusVariable" ::DISPLAY "Current status is: " + myStatusVariable ``` -------------------------------- ### AVEVA E3D .NET Customization: Sample Code - ExamplesAddin Source: https://docs.aveva.com/bundle/e3d-design/page/1001371 A placeholder for sample C# code related to the ExamplesAddin within AVEVA E3D .NET customization. This add-in is expected to contain various usage examples. ```csharp // Placeholder for ExamplesAddin sample code. // This add-in likely demonstrates different features of the Common Application Framework. public class ExamplesAddin : Aveva.Application.Framework.Addins.IAddin { public void StartAddin(Aveva.Application.Framework.IApplication app) { /* ... */ } public void StopAddin() { /* ... */ } } ``` -------------------------------- ### PML Example: Setting and Getting Status Data using Core Objects Source: https://docs.aveva.com/bundle/e3d-design/page/1024116 This PML snippet demonstrates setting and retrieving status data using core status objects like STATUS, STATUSVALUE, and ASSIGNEDSTATUS. It provides a lower-level interaction with the status control system. ```PML // Example to Set and Get Status Data using Core Objects // Assuming 'myObject' is a valid E3D object reference // Create a STATUS object const myStatus = new STATUS("MyStatusDefinition"); // Create a STATUSVALUE object const myStatusValue = new STATUSVALUE("Active"); // Assign the status value to the status object myStatus.Value = myStatusValue; // Create an ASSIGNEDSTATUS object const assigned = new ASSIGNEDSTATUS(myObject, myStatus); // Assign the status to the object (this might internally use StatusData.SetStatus) // The direct assignment method might vary based on PML version and specific API. // This is a conceptual representation. // For direct assignment, StatusData.SetStatus is generally preferred. // To get status data: const retrievedAssignedStatus = STATUSMANAGEMENT.GetAssignedStatus(myObject, "MyStatusDefinition"); if (retrievedAssignedStatus) { print("Retrieved Status: " + retrievedAssignedStatus.Status.Name); print("Retrieved Value: " + retrievedAssignedStatus.Status.Value.Name); } ``` -------------------------------- ### PML Example: Setting and Getting Status Data Source: https://docs.aveva.com/bundle/e3d-design/page/1024116 This snippet demonstrates how to set and retrieve status data using the StatusData PML object. It showcases methods for assigning and removing status, as well as promoting and demoting status values within the E3D design environment. ```PML // Example to Set and Get Status Data // Assuming 'myObject' is a valid E3D object reference // Set a status StatusData.SetStatus(myObject, "MyStatusDefinition", "Active"); // Get status data const statusInfo = StatusData.GetStatus(myObject, "MyStatusDefinition"); if (statusInfo) { print("Status: " + statusInfo.Status + ", Value: " + statusInfo.Value); } // Remove a status StatusData.RemoveStatus(myObject, "MyStatusDefinition"); // Promote status StatusData.PromoteStatus(myObject, "MyStatusDefinition"); // Demote status StatusData.DemoteStatus(myObject, "MyStatusDefinition"); ``` -------------------------------- ### PML Example: Setting and Getting Status Data Source: https://docs.aveva.com/bundle/e3d-design/page/1024052 This PML code snippet demonstrates how to set and retrieve status data using the StatusData PML object. It covers accessing members, constructors, and methods for manipulating status assignments. Ensure the StatusData object is correctly instantiated and available in your PML environment. ```PML DATA StatusData // Example to set status data StatusData.SetStatus("MyElement", "Active", True) // Example to get status data VAR statusValue STRING statusValue = StatusData.GetStatus("MyElement", "Active") OUTPUT("Status for MyElement: " + statusValue) END ``` -------------------------------- ### AVEVA E3D .NET Customization: Addin Start-up Performance Source: https://docs.aveva.com/bundle/e3d-design/page/1001371 Illustrates how to manage add-in start-up performance within the AVEVA E3D Common Application Framework using C#. This is crucial for optimizing the loading times of custom modules. ```csharp using Aveva.Application.Framework; using Aveva.Application.Framework.Addins; public class MyAddin : IAddin { public void StartAddin(IApplication app) { // Initialize add-in components here // Optimize this method for fast startup System.Diagnostics.Trace.WriteLine("MyAddin started."); } public void StopAddin() { // Clean up resources System.Diagnostics.Trace.WriteLine("MyAddin stopped."); } } ``` -------------------------------- ### Query Commands: CLOSE, DELIMIT, END, EXTERNAL, GET, OPEN, SEND, START, TOGGLE Source: https://docs.aveva.com/bundle/e3d-design/page/1042874 Provides a reference for essential Query commands used in AVEVA E3D. These commands facilitate interaction with the data server, including opening and closing connections, sending and receiving data, and controlling command execution. ```query # Example demonstrating the use of Query commands START OPEN "MyProject" "User" "Password" GET "PIPE" WHERE "OBJID" = 12345 SEND "CALCULATE" "WEIGHT" TOGGLE "LOGGING" ON DELIMIT " " EXTERNAL "MyExternalCommand" CLOSE END ``` -------------------------------- ### AVEVA Query Commands for Data Server Source: https://docs.aveva.com/bundle/e3d-design/page/1128742 Provides examples of sending commands to an AVEVA data server using the Query language. This includes opening connections, sending commands, and handling responses. ```query OPEN "MyDataServer" CONNECTION "192.168.1.100:12345" SEND "GET ElementID WHERE Name = 'Pump-001'" AS "GetPumpID" GET "GetPumpID" RESPONSE AS "PumpResponse" CLOSE "MyDataServer" ``` -------------------------------- ### Using Integrator from Command Line Source: https://docs.aveva.com/bundle/e3d-design/page/1024052 This section covers how to utilize the AVEVA E3D Integrator tool directly from the command line. It includes details on object initialization, available methods for comparisons and accepting differences, and diagram viewer methods. An example compare macro is also provided. ```PML REM Example PML script to use Integrator from command line VAR vIntegrator : INTEGRATOR // Initialize Integrator object vIntegrator.Initialise() // Perform a comparison vIntegrator.Compare() // Accept differences vIntegrator.AcceptDifferences() // View diagram vIntegrator.ViewDiagram() // Clean up vIntegrator.Terminate() ```