Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

numerical parameter including in string parameter

Status
Not open for further replies.

bullkater

Civil/Environmental
Jun 27, 2006
1
Hi,

I'm trying to write nodes into files

NWRITE, Fname, Ext, --, KAPPND

with ascending file names using a loop, where Fname is ascending. Something like:

file1.txt
file2.txt
fiel3.txt

My problem is the conversion of the numerical parameter into a string parameter. This one doesn't work (this is only the part that should generate "Fname"):

*DIM,name,STRING
*DO,i,1,10
name=file'i'
*ENDDO

The following warning pops up:
"String parameter must have subscript."

From the Ansys manual, I'm referring to this paragraph (ANSYS Parametric Design Language Guide, 3.5):
"You can prevent parameter substitution by enclosing the parameter name with single quotes ('), for example, 'XYZ'. The literal string is then used; therefore, this feature is valid only in non-numerical fields."

Thank you for any hints here.

bk

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor