Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
      • About the DevOps Program
      • DataMiner DevOps Support
  • Downloads
  • More
    • DataMiner Releases & Updates
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

[SRM] Script to Update Matrix Resources

Solved1.23K views13th July 2023Automation script SRM SRM resources
4
Yohan Silva [DevOps Advocate]166 5th August 2022 0 Comments

Hello,

We pretend to create a script to update all the resources (destination and source) of a matrix to avoid any mismatching mnemonic.

As you guys can see on the screenshot attached, to create a resource of a matrix, on the Device tab, we link the matrix on the element field and the output/input on the instance parameter;

To make it more “friendly” to the costumer, on the General tab, we gave a label (name) which matches with the physical matrix mnemonical.

After some tests, we noted that there was some outputs with a different label if compered with the physical matrix due a change made by the costumer; Our point is: Is it possible to create a script which will read all the inputs or outputs of a matrix and them update the resource name according to it?

Regards,

Yohan

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 13th July 2023

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
4
Jorge Dias [SLC] [DevOps Enabler]4.78K Posted 8th August 2022 0 Comments

Hi Yohan,

Yes you can, below you can find an example of some code to do it, you will need to complete with the logic to get the correct resources and the correct names.

var resourceManager = new ResourceManagerHelper(engine.SendSLNetSingleResponseMessage);

// Adapt the filter according to your needs
var filter = FunctionResourceExposers.MainDVEElementID.Equal(mainElementId);
var resources = resourceManager.GetResources(filter);

foreach (var resource in resources)
{
// Some logic to generate the new name
resource.Name = newName;
}

resourceManager.AddOrUpdateResources(resources);

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 13th July 2023
1
Yohan Silva [DevOps Advocate]166 Posted 17th August 2022 1 Comment

Hello Jorge,

Sorry for the delay! When we tried to validate the script, we found the error shown on the screenshot attached; There is any documentation for this FunctionResourceExposers? Do we have to use a specific lib?


Thank you! Regards,
Yohan

Jorge Dias [SLC] [DevOps Enabler] Posted new comment 13th July 2023
Jorge Dias [SLC] [DevOps Enabler] commented 13th July 2023

You need to include the following:
using Skyline.DataMiner.Net.ResourceManager.Objects;
Class FunctionResourceExposers belongs to that namespace.

Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs