Page 1 of 1
Add a prefix or suffix to a existing element name
Posted: 17 Feb 2012, 10:31
by yuehao
Hi, All
Can I use alter_elements command to add a prefix or suffix to a existing element's name, and then save the new lattice to a file?
Thanks,
Yue
Re: Add a prefix or suffix to a existing element name
Posted: 17 Feb 2012, 10:34
by michael_borland
Yue,
No, alter_elements is just for changing the parameters of an element.
You might be able to do what you want with replace_elements and/or insert_elements.
--Michael
Re: Add a prefix or suffix to a existing element name
Posted: 17 Feb 2012, 11:01
by yuehao
Thank you, Michael
From the manual, my understanding is replace_element requires a pre-defined element. My task is that I have a piece of lattice that will reuse in a machine design many times. I try to assign them different prefix to the name for different locations. Is there smart ways to implement than manually typing in?
Thanks again,
Yue
Re: Add a prefix or suffix to a existing element name
Posted: 17 Feb 2012, 11:27
by michael_borland
Yue,
What I would normally do in a case like this is to write a Tcl script to create the lattice. The script can have whatever loops it needs to write the repeating section out with the desired names.
--Michael
Re: Add a prefix or suffix to a existing element name
Posted: 17 Feb 2012, 11:35
by yuehao
Thank you, I will write a script to do it.