Hi,
I'm trying to figure out how to assign a Visio file to an element through a script. The element is being created with the following code:
Engine.SLNetRaw.HandleSingleResponseMessage(new AddElementMessage) {property initialization}.
However, it appears there isn't an attribute where I can specify the Visio name.
Additionally, I know there's a way to assign Visio files to views using "AssignVisualToViewRequestMessage".
There are also methods for assigning Visio files to services and DMAObjects, but I haven't been able to find a similar method for elements.
Thanks!
Hi Tarik,
There is a SLNetMessage "UpdateElementActiveVisioMessage" which can be used to assign a visio to an element.
Moderator note: This is an internal call and we do not recommend using this, as it is not officially supported and we cannot guarantee that it will still work in the future. As a rule, you should avoid using SLNet calls, as these are subject to change without notice.
Hi Tarik,
Is not an option to assign the Visio file to the protocol (instead of assigning to the element)? In that way, new elements will be use this Visio file by default (no SLNet calls required).
Hope it helps.
Hi Tarik,
Is there any specific reason why you assign a Visio file per element?
From maintenance point of view, it will be easier to maintain a single Visio file instead of maintaining multiple Visio files.
I’m creating an install package which will create four elements from one protocol. Each element will have the same visio, so I’ll not be maintaining many visios but one. If I use the SetAsDefault tag, it will assign the visio to all protocol versions, which is not something we want. We want to assign the visio to specifically these four elements. Additionally, we’re facing some issues where the visio doesn’t get set sometimes. Setting the visio to the element itself would be a fix.
Thanks Miguel.
Hi Miguel,
At the moment, Visio is set as the default for the protocol, but we would prefer a different option – assigning the Visio to elements we want.
Thank you!