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

Duplicating a element in another dma with C#

Solved717 views22nd April 2025Automation IDma
0
João Azevedo237 3rd October 2024 3 Comments

Hello everyone, can someone help with the following error?

(Code: 0x80004003) Skyline.DataMiner.Net.Exceptions.DataMinerException: Array cannot be null.
Parameter name: bytes ---> System.ArgumentNullException: Array cannot be null.

The code i'm using is this:

public void Run(Engine engine)
{
try
{
var dms = engine.GetDms();
var newElement = dms.GetElement("SmartWifi Alarm Collector");
IDma dma = dms.GetAgent(agentid);
newElement.Duplicate("SmartWifi Alarm Collector - BKP2", dma);
}
catch
{
throw;
}
}

With this code i can access the agent, get all the info, but when i try to duplicate a element from another agent into it, i get the error listed above.

João Azevedo Selected answer as best 22nd April 2025
Davor Joleski [DevOps Enabler] commented 4th October 2024

Duplication Method Parameters: Check the Duplicate method’s implementation. Ensure that the parameters you are passing (“SmartWifi Alarm Collector – BKP2″ and dma) are valid and that there’s no underlying assumption that might lead to a null reference.

catch (Exception ex)
{
Console.WriteLine($”Error: {ex.Message}”);
throw; // Optionally rethrow or handle it differently
}

try this to your code where ever is stoped i think

João Azevedo commented 4th October 2024

Hello Davor, i think everything is right, the Duplicate method requires a (string name, IDma dma), i’m passing that IDma and if i try to access the data inside it i can and i can see the data, but if i try to use that IDma to set as a value needed by Duplicate method, i get the error above. Maybe it’s a bug?

Marieke Goethals [SLC] [DevOps Catalyst] commented 18th April 2025

Hi João,
I see that this question has been inactive for some time. Do you still need help with this? If not, could you select the answer that has been most helpful for you (using the ✓ icon)?

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
0
Davor Joleski [DevOps Enabler]572 Posted 6th October 2024 1 Comment

As i searched it should work hmm,i don't know

João Azevedo Posted new comment 7th October 2024
João Azevedo commented 7th October 2024

Yeah, maybe its a bug, but i cant confirm it.

You are viewing 1 out of 2 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