I have a XML file containing the data of Layer Names and Part Names (approx 1,200 lines) … Is there any option to read that XML data and change the subjected layer name with the part name?
LAYER name=“103_1” Part name=“25”
LAYER name=“103_562” Part name=“5”
LAYER name=“103_212” Part name=“130”
Hi @yigit, can you post a small before and after xml file as example ?
Here are the sample files… Layer Names in Rhino should be replaced by Part Names as listed in XML file.
Example.xml (995 Bytes)
Example.3dm (1020.3 KB)
check the ElementTree XML API
Hi @yigit, try this: Example_CG.py (814 Bytes)
Note: you need to make sure the
file_path is correct in line 9 of the script and all layers must be unlocked in order to change the layer name.
Thx again again again as always