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

Get Pid of an element in automation scripts

Solved599 views7th November 2024#automationscript
0
Baranisudha Murugesan784 25th June 2024 6 Comments

I have a list of elements for which i want to find Pid. Lets say I have titanedge decoder-1 element, i want to get its PID.

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 7th November 2024
Ive Herreman [SLC] [DevOps Enabler] commented 25th June 2024

Hi Baranisudha,

Can you please clarify what you need?
Are you referring to ParameterID with PID?

Do you want all PIDs or just a specific one?

Baranisudha Murugesan commented 25th June 2024

I’m attempting to create a service in dataminer through automation scripts. For that Im forming a parameters that are necessary to create service. I need parameter id and filter, primary key. I have got the filter and primary key retrieved. Now i want to get parameter Id of my decoder-1 element.

Im trying element.FindParameterID() by passing primary key value. Im getting a value -1

Jeroen Geldhof [SLC] [DevOps Enabler] commented 25th June 2024

hi Baranisudha.
The FindParameterID is a function which you can use to find the parameter ID linked to a name of the parameter yo provide as a function parameter.

Can you provide the code that you try to execute that goes over the elements to retrieve this data?

Baranisudha Murugesan commented 25th June 2024

Here I retrieve elements using device IP.
———————————————
dms.Notify(type/*DMS_GET_ELEMENT_ID_FROM_IP*/ , subType, ipBus, null, out var result);
engine.GenerateInformation(“result = ” + result);
if (result != null)
{
globalElementID = (string)result;

ids = globalElementID.Split(‘;’);

foreach (var id in ids)
{
var aux = id.Split(‘/’);
engine.GenerateInformation(“DMA ID = ” + aux[0]);
var dmaId = Convert.ToInt32(aux[0]);
engine.GenerateInformation(“Element ID = ” + aux[1]);
var elementId = Convert.ToInt32(aux[1]);
var element = engine.FindElement(dmaId, elementId);
engine.GenerateInformation(“ELEMENT = ” + element);
elements.Add(element);
}
}

Here I’m getting the primarykey if using above code for titan edge decoder
——————————————————————————-
var filter = elements.Select(x => x.GetParameter(“ID [IDX] (” + device.resourceType + ” Overview)”,
device.resourceType + “-” + device.resourceId)).Distinct();

Now im trying to get PID for decoder-1, which is basically 1101. i can see the value in dataminer but i want to fetch the id through the element I have

Marieke Goethals [SLC] [DevOps Catalyst] commented 22nd August 2024

Hi Baranisudha,
One element does not correspond with one PID, since elements usually have many parameters. You therefore need to know which parameters exactly you want to retrieve in order to include those in a service, but this information is missing in your question. Do you know the name of the parameter you want to include? In that case you could use FindParameterID to find the ID based on the parameter name, as Jeroen suggested above.
Or is it in fact the element ID you are trying to retrieve, rather than the parameter ID?

Show 1 more comments

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
0
Marieke Goethals [SLC] [DevOps Catalyst]5.54K Posted 7th November 2024 0 Comments

As this question has now been inactive for a very long time, and there has been no further reaction from you, I will close it. If you still want more information about this, could you post a new question?

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 7th November 2024
You are viewing 1 out of 1 answers, click here to view all answers.
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

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