OK, it is Friday afternoon and if I do not write something soon the week will be missed. We did not do a seminar this week so I can not just post the notes and some comments from the webinar, bummer. All of the real tech support people at PADT have been busy with training, mentoring and doing tech support, so they did not kick anything out. So that leaves me to come up with something. So, as is usually with me, I looked for something I felt guilty or ashamed of. Because that is the way my brain works.
And I remembered that two posting ago I put out a piece of junk macro that printed out tables, as part of the second article on tables in APDL. Although it worked it was brute force and it used a bunch of *if statements to determine how many columns to write. Ugly.
While I was extruding that particular piece of bodily waste something in the back of my mind said that APDL had an undocumented command that would suppress a line-feed on a *VWRITE. This is what one does with ‘C’ and other languages invented after the 1970’s. If you suppress the line-feed, you can just loop over the number of columns.
Next step, go to the help and see if it is there is some clue as to if that tickle in my brain was valid. I found a posting on XANSYS from 2004… by some guy name Eric Miller… Go figure.
There are two descriptors that are not documented in the help: ‘/’ and ‘$’.
‘/’ adds a newline, and ‘$’ suppresses it. So if I want to write out the values in a 1D array all on one line but I don’t know how long the array is I can do:
myar(1) = 1,2,3,4,5,6,7,8,9,10
So, extrapolating this, we can rewrite the nothing-to-be-proud about old wrttbl.mac with
Have a great weekend!