Use the output of a command as input of another one (unix's pipe style)
Use the output of a command as input of another one (unix's pipe style)
(OP)
Hello everyone, here is my problem :
I have an ANSYS simulation in which I define lots of volumes, some must be subtracted from other. To keep track of who is who I use components. But when I use VSBV, compo1, compo2, it creates a new volume that is not in a component. Since I really do not like referring to volumes by their ID number (which seem to be unpredictable), I would like to do something like :
CM,COMP3,(VSBV, compo1, compo2)
to define the output of the VSBV command as the volume to define comp3 with. Now the line written above is obviously wrong. Does anyone if there is a way to achieve that?
Thanks in advance,
Philippe
EDIT: I should add that I never followed any kind of ANSYS course, I learned it with a script I have been given in order to achieve a precise kind of simulation. So I surely lack basic knowledge.
I have an ANSYS simulation in which I define lots of volumes, some must be subtracted from other. To keep track of who is who I use components. But when I use VSBV, compo1, compo2, it creates a new volume that is not in a component. Since I really do not like referring to volumes by their ID number (which seem to be unpredictable), I would like to do something like :
CM,COMP3,(VSBV, compo1, compo2)
to define the output of the VSBV command as the volume to define comp3 with. Now the line written above is obviously wrong. Does anyone if there is a way to achieve that?
Thanks in advance,
Philippe
EDIT: I should add that I never followed any kind of ANSYS course, I learned it with a script I have been given in order to achieve a precise kind of simulation. So I surely lack basic knowledge.





RE: Use the output of a command as input of another one (unix's pipe style)
cmsel,s,compo1
cmsel,a,compo2
vsbv,compo1,compo2
cmsel,u,compo1
cm,compo2,volu
Also, take a look at the _return function. It will return the number of newly created geometric entities. It is a little limited in that it only works for some geometry creation commands ( not VSBV unfortunately), but is very useful.
Rick Fischer
Principal Engineer
Argonne National Laboratory
RE: Use the output of a command as input of another one (unix's pipe style)