Ask our Experts
Didn't find what you are looking for? Ask our experts!
A support forum for AVEVA Plant SCADA (formerly Citect SCADA). Share new and exciting product information, connect, learn, and collaborate with the ecosystem of Plant SCADA Users. AVEVA Plant SCADA a reliable, flexible and high-performance Supervisory Control and Data Acquisition software solution for industrial process customers. This forum is to connect, share, learn and collaborate new and exciting product information. Feel free to join and share to your Ecosystem of Plant SCADA Users.
Search in
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-09-11 10:52 AM
Hello everyone,
I am working on replacing all the genies of a certain type in a project while changing certain parameters contained within them. I am using the automation interface.
The goal is to check each page in the project for instances of the old genie. I achieved this by giving them a metadata property "TipoUpgrade" which tells me they are the ones to be replaced (please tell me if there is a simpler way to do this). Afterwards, what I want to do is read the parameters in the genie, store them and delete the old genie. Then, after modifying certain aspects in these values, I want to instance the new genie in the same position as the old one and write the adequate parameters to the corresponding fields. So far what I have is this:
Note that the parameters in the old and new genies are NOT the same. I will use the parameters I read from the old genie to search for the appropriate ones for the new genie in another document.
Thank you for your attention!
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-09-14 08:55 PM
You might get more responses over at the AVEVA Forum:
https://community.aveva.com/heroes-hq/f/aveva-plant-scada
I don't personally have much experience with the GBA, so I can't personally answer your question without deeper research. The following is an answer from a GPT chat bot, please take all information on face value and do your own research. Shared for information purposes only and caries no guarantees:
{response from GPT start now...}
I see you're looking to automate the replacement of Genies in AVEVA Plant SCADA using the Graphics Builder (GB) Automation Interface—this is a great way to handle bulk updates without manual editing. The GB Automation Interface exposes an OLE automation server that lets you script page manipulations, object selection/deletion, and Genie placement via Visual Basic (VB) or VBA. It's particularly useful for migrating or updating legacy Genies to newer templates.
Based on the Citect/AVEVA documentation and community examples, here's a step-by-step approach to replace a specific Genie on an existing page. This assumes you're targeting Genies by name, tag, or position (you'll need to adapt based on your criteria). I'll include a VB code sample to get you started.
Dim gb As IGraphicsBuilder2
Set gb = New GraphicsBuilder.GraphicsBuilder
With gb
.Visible = True ' Optional: Shows GB window for debugging
' Step 1: Open the page
.PageOpen "YourProjectName", "YourPageName" ' e.g., "Demo", "MainPanel"
' Step 2: Find and delete old Genie (loop example, targeting by name)
Dim oldGenieName As String, oldTag As String, oldX As Integer, oldY As Integer
oldGenieName = "OldMotorGenie" ' Replace with your target Genie name
.PageSelectFirstObject ' Start at first object
Do While True
Dim objType As String
objType = .ObjectGetProperty("Type") ' Check if it's a Genie
If objType = "Genie" Then
Dim objName As String
objName = .ObjectGetProperty("Name") ' Or use "Tag" if that's your identifier
If objName = oldGenieName Then
' Capture position and tag before delete
oldX = .ObjectGetProperty("X")
oldY = .ObjectGetProperty("Y")
oldTag = .ObjectGetProperty("Tag")
.PageDeleteObject ' Delete it
Exit Do
End If
End If
If Not .PageSelectNextObject Then Exit Do ' No more objects
Loop
' Step 3: Place new Genie and configure
If oldTag <> "" Then ' Only if we found and deleted one
.LibraryObjectPlace "include", "YourLibrary", "NewMotorGenie", 0, True ' Library path and new Genie name
.PositionAt oldX, oldY ' Match old position
.LibraryObjectPutProperty "Tag", oldTag ' Preserve tag (add more properties as needed)
' Optional: Set other props, e.g., .LibraryObjectPutProperty "Rotation", 90
End If
' Step 4: Save and close
.PageSave
.PageClose
.Visible = False
End With
Set gb = Nothing
MsgBox "Genie replacement complete!"
You can also check the official docs for the full function reference or community threads on similar migrations.
Hope this helps—let us know how it goes!
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-09-14 08:55 PM
You might get more responses over at the AVEVA Forum:
https://community.aveva.com/heroes-hq/f/aveva-plant-scada
I don't personally have much experience with the GBA, so I can't personally answer your question without deeper research. The following is an answer from a GPT chat bot, please take all information on face value and do your own research. Shared for information purposes only and caries no guarantees:
{response from GPT start now...}
I see you're looking to automate the replacement of Genies in AVEVA Plant SCADA using the Graphics Builder (GB) Automation Interface—this is a great way to handle bulk updates without manual editing. The GB Automation Interface exposes an OLE automation server that lets you script page manipulations, object selection/deletion, and Genie placement via Visual Basic (VB) or VBA. It's particularly useful for migrating or updating legacy Genies to newer templates.
Based on the Citect/AVEVA documentation and community examples, here's a step-by-step approach to replace a specific Genie on an existing page. This assumes you're targeting Genies by name, tag, or position (you'll need to adapt based on your criteria). I'll include a VB code sample to get you started.
Dim gb As IGraphicsBuilder2
Set gb = New GraphicsBuilder.GraphicsBuilder
With gb
.Visible = True ' Optional: Shows GB window for debugging
' Step 1: Open the page
.PageOpen "YourProjectName", "YourPageName" ' e.g., "Demo", "MainPanel"
' Step 2: Find and delete old Genie (loop example, targeting by name)
Dim oldGenieName As String, oldTag As String, oldX As Integer, oldY As Integer
oldGenieName = "OldMotorGenie" ' Replace with your target Genie name
.PageSelectFirstObject ' Start at first object
Do While True
Dim objType As String
objType = .ObjectGetProperty("Type") ' Check if it's a Genie
If objType = "Genie" Then
Dim objName As String
objName = .ObjectGetProperty("Name") ' Or use "Tag" if that's your identifier
If objName = oldGenieName Then
' Capture position and tag before delete
oldX = .ObjectGetProperty("X")
oldY = .ObjectGetProperty("Y")
oldTag = .ObjectGetProperty("Tag")
.PageDeleteObject ' Delete it
Exit Do
End If
End If
If Not .PageSelectNextObject Then Exit Do ' No more objects
Loop
' Step 3: Place new Genie and configure
If oldTag <> "" Then ' Only if we found and deleted one
.LibraryObjectPlace "include", "YourLibrary", "NewMotorGenie", 0, True ' Library path and new Genie name
.PositionAt oldX, oldY ' Match old position
.LibraryObjectPutProperty "Tag", oldTag ' Preserve tag (add more properties as needed)
' Optional: Set other props, e.g., .LibraryObjectPutProperty "Rotation", 90
End If
' Step 4: Save and close
.PageSave
.PageClose
.Visible = False
End With
Set gb = Nothing
MsgBox "Genie replacement complete!"
You can also check the official docs for the full function reference or community threads on similar migrations.
Hope this helps—let us know how it goes!
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-09-17 01:50 AM
Thank you Olivier, I was able to achieve what I wanted using your advice.
Link copied. Please paste this link to share this article on your social media post.
You’ve reached the end of your document
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.