Is it possible to retrieve a POST26 variable name? The NSOL command allows one to associate
a name to a given variable. Is it possible to later retrieve the name assigned to a given
variable, either through a *get or similar fashion? *get,par,vari,... will allow one to retrieve
many items for a given variable, with the exception of the name.


Below is a simple model followed by the POST26 commands that use the print module
status output as input to a string array that is further manipulated to get the variable numbers
and names.

/prep7
et,1,42
mp,ex,1,3e7
mp,prxy,1,.3
n,1
n,2,1
n,3,1,1
n,4,,1
e,1,2,3,4
d,1,all
d,4,ux
f,3,fy,-100
fini
/solu
time,1
solve
time,2
f,3,fy,-250
solve
fini
/post26
nsol,2,3,u,y,firs
nsol,9,3,u,x,seco
store
!prvar,2,9
!
print
/out,stat,lis
stat
/out
*sread,vars,stat,lis,,,11
*get,varc,parm,vars,dim,y
*dim,varnum,array,varc-12
*dim,varnam,char,varc-12
*do,jj,1,varc-12
varnum(jj)=valchr(strsub(vars(1,jj),44,4))
varnam(jj)=strsub(vars(1,jj),73,4)
*enddo
*stat,varnum(1) ! variable numbers
*stat,varnam(1) ! varuiable labels
vars(1)= ! string with bottom of status file
varc= ! count of variables
jj= ! do loop counter
*stat





Show Form
No comments yet. Be the first to add a comment!