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
    • Agility
      • Kanban workshop
      • Agile Fundamentals
    • 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
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
    • Global Feedback Survey
  • Support
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Read and update View Property through automation script

Solved922 views29th March 2024Automation view properties
0
Michael Kotsias [DevOps Advocate]97 25th March 2024 2 Comments

Dear dojo,

I’m creating an automation script where i read a view Property through

IDms dms = engine.GetDms();
IDmsView myView = dms.GetView(Convert.ToInt16( viewid ));

IDmsViewProperty myViewProperty = myView.Properties.SingleOrDefault(x => x.Definition.Name == “myPropertyName”);

This part is fine but when i try to update the Value with

myViewProperty.Value = “new value”;

i get the message “myViewProperty.Value cannot be assigned to — it is read only”

I’m able to assign a value manually. So i don’t understand why this property should be read only.

Is there a way to manipulate this?

Thanks

Michael Kotsias [DevOps Advocate] Posted new comment 29th March 2024
Tom Waterbley [SLC] [DevOps Catalyst] commented 29th March 2024

Hi Michael. Based on this question and other feedback, we decided to make setting properties on elements, services and views a bit more intuitive. The property object now contain IsWritable and AsWritable methods, which replace the cast to IWritableProperty. This has been implemented in version 1.1.1.8 of the DMS library.

Michael Kotsias [DevOps Advocate] commented 29th March 2024

Hi Tom,

Cool! This makes sense. Thank you for information.

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
0
Tom Waterbley [SLC] [DevOps Catalyst]8.93K Posted 25th March 2024 0 Comments

Hi Michael,

This example shows how to update properties of an element. A similar approach can be used to update properties of views: https://docs.dataminer.services/develop/devguide/ClassLibrary/ClassLibraryExamples.html#setting-a-property-and-renaming-the-element.

The trick is to first cast the property to IWritableProperty.

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 26th March 2024
0
Michael Kotsias [DevOps Advocate]97 Posted 25th March 2024 1 Comment

The trick to cast the property did the job even on my view property.

Thank you very much!

Tom Waterbley [SLC] [DevOps Catalyst] Posted new comment 25th March 2024
Tom Waterbley [SLC] [DevOps Catalyst] commented 25th March 2024

Glad to hear it did the trick!

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