There is a way to get list of agents available through DMS. But I want to find the particular agent from which the script is running. dms.GetAgent(int) method needs current agent id to be passed to fetch the details.
Is there any way to get Hostlink, agent Id and agent Name in which the automation script is deployed/accessed from?
Hello Baranisudha,
If you get the connection when you script is running, either through IEngine.GetUserConnection() or IDms.Communication.SlNetConnection, you can the ServerDetails from the connection. This object contains the ID, IP, and Name or the connected agent which the script is working on.
Here's the page in the docs for this object: Class ServerDetails | DataMiner Docs.
I hope this helps you,
Bauti
I believe that the IP address of the Agent will be your best bet to include a link, but I'm assuming that the IP might not be the preferred way to link the DMA. In that case, you could define a variable at the top of your code and set that to the Host Link of the DMS and configure it per system, or you could have a dictionary of links based on the DMS IDs
I have got the agent details in this. Now i also need Host link to make the user navigate to the DMA from email. Is there any property to get Hostlink from IDms or engine objects?