######## WORK NOTES COPIED FROM INCIDENT 422713 ########


QUESTION:

The /inquire command is documented to return the date/time stamp as follows: yyyymmdd.hhmmss
When I test that command, it returns the proper date string, but it usually returns only 1 value for the time string, for example 20050727.1
Is the command functioning properly? Is there a way to retrieve the time string?

ANSWER:

There is a limitation of # of significant figures reported in the lister window (utility menu => parameters => scalar parameters').

Have a look at the attached readme file. This strategy seems to work around the issue satisfactorily.

Instructions:
1) Copy all files to a working directory
2) Start ANSYS in the working directory where the files reside
3) Invoke macro file date01.mac
4) Output: file date_time.txt containing listing of date and time for file scrap.txt.


Contects of date01.mac:

/inquire,scrap,date,scrap.txt
date_=nint(scrap)
time_=nint(1e6*(scrap-nint(scrap)))

*cfo,date_time,txt

*vwr,date_
DATE: %I

*vwr,time_
TIME: %I

*cfc




Take care,



Bill


######## WORK NOTES COPIED FROM INCIDENT 422713 ########


QUESTION:

The /inquire command is documented to return the date/time stamp as follows: yyyymmdd.hhmmss
When I test that command, it returns the proper date string, but it usually returns only 1 value for the time string, for example 20050727.1
Is the command functioning properly? Is there a way to retrieve the time string?

ANSWER:

There is a limitation of # of significant figures reported in the lister window (utility menu => parameters => scalar parameters`).

Have a look at the attached readme file. This strategy seems to work around the issue satisfactorily.

Instructions:
1) Copy all files to a working directory
2) Start ANSYS in the working directory where the files reside
3) Invoke macro file date01.mac
4) Output: file date_time.txt containing listing of date and time for file scrap.txt.


Contects of date01.mac:

/inquire,scrap,date,scrap.txt
date_=nint(scrap)
time_=nint(1e6*(scrap-nint(scrap)))

*cfo,date_time,txt

*vwr,date_
DATE: %I

*vwr,time_
TIME: %I

*cfc




Take care,



Bill





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