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
  • Blog
  • Questions
  • Learning
    • E-learning Courses
    • 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
    • Tutorials
    • 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
    • DataMiner Insights
      • Security
      • Integration Studio
      • System Architecture
      • DataMiner Releases & Updates
      • DataMiner Apps
    • 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
  • Downloads
  • More
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Getting AdvancedSettings using IDmsElement properties

Solved946 views6th September 2021
1
Juan Falcon250 3rd September 2021 0 Comments

Hello

Im using this code to get propiertes of elements and it's working with Nam/protocol but when i try to get AdvancedSettings  i get this error.

(34,18): warning CS1701: Assuming assembly reference 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' used by 'Interop.SLDms' matches identity 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' of 'mscorlib', you may need to supply runtime policy
(50,7): warning CS1701: Assuming assembly reference 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' used by 'Interop.SLDms' matches identity 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' of 'mscorlib', you may need to supply runtime policy
(102,42): error CS1061: 'IDmsElement' does not contain a definition for 'AdvancedSettings' and no accessible extension method 'AdvancedSettings' accepting a first argument of type 'IDmsElement' could be found (are you missing a using directive or an assembly reference?)

2021/09/03 14:33:07.747|SLManagedScripting.exe|ManagedInterop|ERR|-1|113|No CodeBuilder found for cookie0
2021/09/03 14:33:07.748|SLProtocol - 4620 - Manage|14156|CQAction::Run|ERR|-1|QAction [3] triggered by [pid=100/idx=-1/pk=/user=] failed. (0x80040221)
	Input: new = <NULL>
	Input: old = <NULL>
	Input: extra = <NULL>

his is the code:

IDms myDms = protocol.GetDms();

IDma agent = myDms.GetAgent(protocol.DataMinerID);

ICollection<IDmsElement> elements = agent.GetElements();

foreach (IDmsElement element in elements)

{ .....

var1=element.Name; //works ok

var2=element.AdvancedSettings.IsHidden; //get error

......}

PD: I know that i could use "dms.GetInfo(8/*DMS_GET_INFO*/ , 0, ref data)" but  IDms look more clean.

Im using Dataminer 10.1.3.0-9963

Thanks

Juan Falcon Selected answer as best 6th September 2021

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
2
Jarno Lernou [SLC] [DevOps Enabler]5.00K Posted 5th September 2021 1 Comment

Hi Juan, I'm not sure if your problem is equal to mine, but I have encountered similar behaviour, seeing the message 'does not contain a definition for'. For me, the class library feature was enabled but was not set to automatically update. In the background, only the relevant parts of the library are included. Code that is irrelevant for the actions you take is thus excluded. If there is a new type/class used in your script and the library code is not automatically included/updated then you might have that error.

If this is the error you are experiencing, you can either set the library to automatically update (1) or update manually (2).

(1)

(2)

Juan Falcon Selected answer as best 6th September 2021
Juan Falcon commented 6th September 2021

Thanks a lot, it works!!

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

Recent questions

How to implement bearer token refresh? 0 Answers | 0 Votes
Web Applications exception in Cube due to invalid certificate 0 Answers | 0 Votes
Redundancy Groups and Alarming – Duplicate Alarms 0 Answers | 0 Votes

Question Tags

adl2099 (115) alarm (62) Alarm Console (82) alarms (100) alarm template (83) Automation (223) automation scipt (111) Automation script (167) backup (71) Cassandra (180) Connector (109) Correlation (69) Correlation rule (52) Cube (151) Dashboard (194) Dashboards (188) database (83) DataMiner Cube (57) DIS (81) DMS (71) DOM (140) driver (65) DVE (56) Elastic (83) Elasticsearch (115) elements (80) Failover (104) GQI (159) HTTP (76) IDP (74) LCA (152) low code app (166) low code apps (93) lowcodeapps (75) MySQL (53) protocol (203) QAction (83) security (88) SNMP (86) SRM (337) table (54) trending (87) upgrade (62) Visio (539) Visual Overview (345)
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

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin