Assign Multiple Properties to Multiple (Selected) Objects ?

Started by johmut, September 03, 2021, 12:26:51 PM

Previous topic - Next topic

johmut

Hi, I can't seem to add Properties to a selection of objects on a view ? let alone Multiple Properties to such a selection? Is there a way?

Xiaoqi

Hello,

If you've enabled jArchi, then it's easier to write several lines of code for this kind of assignment task, like below:


/*
* Archi Script for assigning properties to the selected objects
*/

$(selection).prop("property1", "value1");
$(selection).prop("property2", "value2");
$(selection).prop("property3", "value3");


However, the property you assigned to an element object becomes its property, it's attached to the object, not limited to this specific view.

If you want to explore more on the script, you can post more question in the jArchi sub-group.

Hope this helps, regards,
Xiaoqi

Jean-Baptiste Sarrodie

Hi,

Quote from: johmut on September 03, 2021, 12:26:51 PM
Hi, I can't seem to add Properties to a selection of objects on a view ? let alone Multiple Properties to such a selection? Is there a way?

That's not supported by Archi because this raises several challenges. As pointed out by Xiaoqi, jArchi (the scriping plugin) can provide some level of support. There's an example of an interractive script here: https://gist.github.com/jbsarrodie/479fde4360eb4187d40022465d28e627

Regards,

JB
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.