Page 1 of 1

[Gid14] can't change layer name

Posted: Thu Jan 09, 2020 4:30 pm
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

Re: [Gid14] can't change layer name

Posted: Thu Jan 09, 2020 6:48 pm
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

Re: [Gid14] can't change layer name

Posted: Wed Jan 22, 2020 1:33 pm
by EthanObrien1973
Thank you so much for this question! I've had a very similar problem recently, thanks again!