Pinning Elements in the Data Portal with a Script
- Updated2024-09-12
- 1 minute(s) read
Creating Scripts > Working with Files > Pinning Elements in the Data Portal with a Script
Pinning Elements in the Data Portal with a Script
Use Pins in the Data Portal to always display specified groups and channels regardless of the enabled Filters. Pinned groups and channels are identified with a yellow pin. To pin all channels of the first channel group with a script, complete the following steps:
-
Select DIAdem SCRIPT.
-
Select File»New»VBS Script to create a new script.
-
Enter or copy the following text into the script editor:
VBScript Python Dim oMyChannels, oMyChannel Set oMyChannels = Data.Root.ChannelGroups(1).Channels For Each oMyChannel in oMyChannels Call Portal.Structure.Pin(oMyChannel,TRUE) Next
-
Select Script»Run VBS Script to start the script. All channels of the first channel group are now pinned in the Data Portal.
-
Type or copy the following text into the Script Editor to automatically pin new channels in the Data Portal when the Data Portal displays only pinned channels.
VBScript Python Portal.Structure.UseAutoPins = True