[Gid14] can't change layer name

Moderator: GiD Team

Post Reply
kstn
Posts: 41
Joined: Wed Jan 21, 2015 2:03 pm

[Gid14] can't change layer name

Post by kstn »

Hi

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?

Best
User avatar
escolano
Posts: 1918
Joined: Sun Sep 05, 1982 10:51 pm

Re: [Gid14] can't change layer name

Post by escolano »

Rename
This is not a simple change of name of a layer: you don't have one layers, you have two layers:
abc (without parent)
and
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
escape

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
EthanObrien1973
Posts: 1
Joined: Tue Jan 21, 2020 1:12 pm
Contact:

Re: [Gid14] can't change layer name

Post by EthanObrien1973 »

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