[Gid14] can't change layer name

Moderator: GiD Team

Posts: 33
Joined: Wed Jan 21, 2015 2:03 pm

[Gid14] can't change layer name

Postby kstn » Thu Jan 09, 2020 4:30 pm


Seem like it's not possible to change the name of the sub-layers to a name of upper level, for example

Layers ChangeName abc//xyz xyz mescape

This command does not work because GiD (14.0.3) automatically appends abc// to xyz and there are no changes. Any idea how is this possible and solution to fix?

User avatar
Posts: 1699
Joined: Thu Sep 18, 2014 3:31 pm

Re: [Gid14] can't change layer name

Postby escolano » Thu Jan 09, 2020 6:48 pm

This is not a simple change of name of a layer: you don't have one layers, you have two layers:
abc (without parent)
xyz (with parent layer=abc, its fullpath name is abc//xyz)

then you must do two steps:
1-change the parent of xyz to none
2-delete the layer abc
'Layers ChangeParent abc//xyz ""
'Layers delete abc

Instead of process commands it is also possible to use Tcl direct commands
GiD_Layers edit parent abc//xyz ""
GiD_Layers delete abc

These changes of layers are not directy reflected in the layers window, you can force its refresh with this tcl proc
GidUtils::UpdateWindow LAYER
Posts: 1
Joined: Tue Jan 21, 2020 1:12 pm

Re: [Gid14] can't change layer name

Postby EthanObrien1973 » Wed Jan 22, 2020 1:33 pm

Thank you so much for this question! I've had a very similar problem recently, thanks again!

Return to “Customization”

Who is online

Users browsing this forum: No registered users and 1 guest