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
Add a prefix or suffix to a existing element name
Moderators: cyao, michael_borland
-
- Posts: 1933
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Add a prefix or suffix to a existing element name
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
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
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
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
-
- Posts: 1933
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Add a prefix or suffix to a existing element name
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
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
Thank you, I will write a script to do it.