Feature Requests
Rename wires after terminal

Would it be possible to add a feature that renames wires with the same name as connected terminals?

If I have a wire lets say 10 connected to terminal 10.
I then rearrange the terminals so terminal 10 is now 15.

I want the wire to also change name to 15.

Would it be possible to add a feature that renames wires with the same name as connected terminals? If I have a wire lets say 10 connected to terminal 10. I then rearrange the terminals so terminal 10 is now 15. I want the wire to also change name to 15.

Hi Tomi,

Thank you for your suggestion and we really appreciate that. However, we believe this is not commonly practiced by most of the users and most of the time, the wire name is different from terminal name. Therefore, we suggest you to rename the wires after renumbering the terminals. With wire propagation option enabled (File | Preferences | Electra Options tab | Automatic wire propagation and detection), all of the wires that connect with each other will automatically sync their name after renaming one of them.

Hope it helps.

Hi Tomi, Thank you for your suggestion and we really appreciate that. However, we believe this is not commonly practiced by most of the users and most of the time, the wire name is different from terminal name. Therefore, we suggest you to rename the wires after renumbering the terminals. With wire propagation option enabled (File | Preferences | Electra Options tab | Automatic wire propagation and detection), all of the wires that connect with each other will automatically sync their name after renaming one of them. Hope it helps.

Is there any possibility to create a plugin that performs the task i'm asking for?

Is there any possibility to create a plugin that performs the task i'm asking for?

Hi Tomi,
Yes, you could create a plugin to update the wires names that connect to a selected terminal. Kindly follow the steps below to create the plugin:

1- Open the drawing and click on Plugins on the left panel:

60a623ef62296

2- After that, click on the menu icon and choose New plugin | Personal to create a new plugin:
60a6243b2b857
3- Right-click on the new plugin and choose Edit Script:
60a624b26e5eb
4- Copy the script below and paste it on the plugin page:

var terminals = Vecta.selection.shapes().filter(function (shape) { return shape.symType() === 22; });
if (terminals.length === 0) {
$.notify('Please select a terminal', 'Warn');
}
else {
terminals.forEach(function (terminal) {
var wire = terminal.connectedShapes()[0];
if (wire) { wire.text(terminal.text()); }
});
}

5- Click on the Save button to save the script.
6- After that, go back to the drawing and select the terminals. You could press and hold the Ctrl key, then click on multiple terminals to select multiple terminals.
7- Click on the plugin to run it.
8- Wait until the loading message is hidden.
9- After that, the wire names will be updated.
Hope it helps.

Hi Tomi, Yes, you could create a plugin to update the wires names that connect to a selected terminal. Kindly follow the steps below to create the plugin: 1- Open the drawing and click on Plugins on the left panel: ![60a623ef62296](serve/attachment&path=60a623ef62296) 2- After that, click on the menu icon and choose New plugin | Personal to create a new plugin: ![60a6243b2b857](serve/attachment&path=60a6243b2b857) 3- Right-click on the new plugin and choose Edit Script: ![60a624b26e5eb](serve/attachment&path=60a624b26e5eb) 4- Copy the script below and paste it on the plugin page: ```` var terminals = Vecta.selection.shapes().filter(function (shape) { return shape.symType() === 22; }); if (terminals.length === 0) { $.notify('Please select a terminal', 'Warn'); } else { terminals.forEach(function (terminal) { var wire = terminal.connectedShapes()[0]; if (wire) { wire.text(terminal.text()); } }); } ```` 5- Click on the Save button to save the script. 6- After that, go back to the drawing and select the terminals. You could press and hold the Ctrl key, then click on multiple terminals to select multiple terminals. 7- Click on the plugin to run it. 8- Wait until the loading message is hidden. 9- After that, the wire names will be updated. Hope it helps.
edited May 20 at 10:03 am
46
3
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft