fetraining
Aerospace
- Jul 29, 2008
- 17
I use the Concatenate function a lot to group data into a comma deliminated string to paste into various FEA input files.
A simple example is to calculate x,y,z grid coordinates, say (23.4,45.6,78,9) stored in A2:A4 and then produce a string such as:
" GRID,23,23.4,45.6,78,9"
where GRID is a keyword and 23 is the integer ID stored in A1.
I use:
Concatenate("GRID",A1,",",A2,",",A3,",",A4)
The problem is if I have a 0.0 coordinate, then the Concatenate function returns 0 (integer) in the string. Most FE codes are very picky and need a real value as 0.0, and will fail on 0.
I would prefer to avoid using a macro or VB as it is often done 'on the fly'.
Any suggestions very welcome,
regards,
Tony
Tony Abbey
A simple example is to calculate x,y,z grid coordinates, say (23.4,45.6,78,9) stored in A2:A4 and then produce a string such as:
" GRID,23,23.4,45.6,78,9"
where GRID is a keyword and 23 is the integer ID stored in A1.
I use:
Concatenate("GRID",A1,",",A2,",",A3,",",A4)
The problem is if I have a 0.0 coordinate, then the Concatenate function returns 0 (integer) in the string. Most FE codes are very picky and need a real value as 0.0, and will fail on 0.
I would prefer to avoid using a macro or VB as it is often done 'on the fly'.
Any suggestions very welcome,
regards,
Tony
Tony Abbey