After replacing an existing Visio file with a new version with changes how can I get DataMiner/Cube to reload the new file so all the Cube clients will see/use the new version. Restarting DM is not an option.
Thanks
Hi Jeff,
When editing a Visio file via Cube or when uploading and replacing a Visio file via Cube, all clients will immediately update the drawing to the new one. So, this should already be the case without the need for a restart...
Let us know if your use case would be different.
Bert
If you indeed copy the Visio file directly to the file system of the DMA, then DataMiner won’t be aware of that until the next restart. One sidenote: you can only do this on a single node DMS, otherwise you would need to copy the file to all nodes in the cluster. So, using Cube would be the recommended way.
That being said, maybe there exists a reload message you can send to the server to refresh all Visio files, I’m not sure because I don’t know all those messages. But maybe somebody else will be able to point out a relevant SLNet Message, if there is one…
Hi Bert, hi Jeff,
I know there are SLNet messages that can be used, in an automation script or vi a the Client test Tool, to assign a given Visio file to a view or to a service, e.g.:
// assign a visio file to a view
string filePath = @”c:\my_visio.vsdx”;
AssignVisualToViewRequestMessage avReqMsg = new AssignVisualToViewRequestMessage(viewID, filePath);
Engine.SLNet.SendMessage(avReqMsg);
Similarly, there is a AssignVisualToServiceRequestMessage.
I’m noticing there is also the message: SetVisualOverviewDataMessage, which might be useful but that I never used.
DataMiner (SLNet) is providing the “Last write time” for all Visio files. This is used in Cube to check if the local cached Visio file should be invalidated. However, SLNet (and Cube) is caching these results until the Visio file is changed through the DataMiner API (the messages that Paulo is referring to). You can also force Cube to fetch the latest Visio file (for your user only) by removing the cached Visio files from your machine (stored in: C:Users\AppDataLocalSkylineDataMinerDataMinerCubeVisioCache).
Thanks Bert.
My case is the I edit the visio file offline and then copy the version back over to the DMA overwriting the existing file. I can then go into the Protocols and Templates app and select upload a custom visio and just select the same file but I was wondering if if there was a way to just let DM know that the current file has changed and needs to be reloaded. In cases were it is possible, and I can simply open and edit the actual existing file in Visio, when the changes are saved in Visio this somehow triggers DM to reload the file not requiring any further action.