Hello!
I’m trying to read all nodal displacement records (N_DISP) from a CDB using +PROG TEMPLATE.
And the CDB file looks like this:
And the TEDDY script is:
+PROG TEMPLATE urs:1
head shell displacements
let#CDB_IER 0
@CDB ShellModel
@KEY N_DISP 1
loop
let#N @0
let#UX @2
let#UY @4
let#UZ @6
txb 'Node=' #N ' UX=' #UX ' UY=' #UY ' UZ=' #UZ
endloop #CDB_IER < 2
end
And it runs with no problem but it doesnt give me the correct displacements:
So my question is: How can I get the nodal displacements correctly from the CDB file?
Thank you.
Hello,
I think, when a you read from the database with @, the pointer goes to the next item. So with your code, you involuntarily jump over the value you want to read (see every second row in your screenshot is 0).
Maybe you decrease your @-values by one:
let#N @0
let#UX @1
let#UY @3
let#UZ @5
or you use the actual name of the item:
let#N @0
let#UX @(UX)
let#UY @(UY)
let#UZ @(UZ)
Does that help?
I think you need to format the text string to include more values after the decimal.
e.g. #UX → #(#UX,10.8)
You were right, I was accessing the wrong outputs. I have corrected them accordingly:
Thank you very much 

I fixed the part according to your comment and it worked! Thank you very much 