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

Script to delete element

Solved1.32K views8th February 2023automation scipt delete element
5
Jeroen Geldhof [SLC] [DevOps Enabler]5.07K 7th February 2023 0 Comments

I want to create a script that deletes an element based on the DMA/EID input parameter.
Doing a follow I found that this uses the SetElementStateMessage.
I also want to check the response to see if it succeeds, which should be a SetEelementStateResponseMessage.

However in C# it doesn\’t seem to find that class.
What\’s the propper way to check the response from the SetElementStateMessage in an automation script?

Jeroen Geldhof [SLC] [DevOps Enabler] Selected answer as best 8th February 2023

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
4
João Severino [SLC] [DevOps Catalyst]13.11K Posted 7th February 2023 2 Comments

Hi Jeroen,

That class should be on the same namespace “Skyline.DataMiner.Net.Messages” as the request message you are using, so I am not sure why you are getting the error.

Could you check that the namespaces are correct? And if you don’t have extras that may be causing conflict?

Alternatively, you can check Class Library and in there you have the following method IDmsElement Delete | DataMiner Docs

It should allow you to do what you need in an easier manner.

Jeroen Geldhof [SLC] [DevOps Enabler] Posted new comment 8th February 2023
Jens Vandewalle [SLC] [DevOps Enabler] commented 7th February 2023

Example code with Class Library:
IDms myDms = engine.GetDms();
DmsElementId myElementInfo = new DmsElementId(“DMA ID/Element ID”);
IDmsElement myElement = myDms.GetElement(myElementInfo);
myElement.Delete();

Jeroen Geldhof [SLC] [DevOps Enabler] commented 8th February 2023

this library is awsome

3
Tom Van Bruaene [SLC] [DevOps Member]758 Posted 7th February 2023 1 Comment

Hi,

Is it possible you’re trying this on an older Dataminer version?

SetElementStateResponseMessage was added in 10.0.5, so in versions prior to this, we don’t respond with anything to the SetElementStateMessage.

Jeroen Geldhof [SLC] [DevOps Enabler] Posted new comment 8th February 2023
Jeroen Geldhof [SLC] [DevOps Enabler] commented 8th February 2023

It’s a 10.2.12. But I eventually went for the solution with the IDms package suggested below.

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