Sofistik CDB - reading data

Hello,
I have started working with Sofistik CDB. In CDB manual are direct question to Database and I have used them. But I get a problem and I can’t found any materials about reading more than one information when I read max node results.
I have used the correct sequence as in the tutorial Datenbank Zugriffe
My code - I have used + instead of @ “I can’t use addnotation, because they are read as users”
+KEY N_DISPC 71061 $$71061 Loadcase for max UX
LET#UX +UX $$$ I look for max value firstly
LET#NR +NR
LET#UX +UX
LET#UY +UY $$$ I want read correspoding displ UY additionaly
LET#UZ +UZ $$$ I want read correspoding displ UZ additionaly
txe NR #NR and disp #UX mm , disp #UY mm & disp #UZ mm - belong to the same node

But at the end I get wrong results - not corresponding forces but maximal and additionaly them are not from LC 71061.

Regards
Paulina

This text will be blurred

  1. Check out the text examples in your installation folder, e.g.
    C:\Program Files\SOFiSTiK\2020\SOFiSTiK 2020\interfaces\examples\cadinp\
  2. Check out the online guide:
    CADINP language — CDB Interfaces 2020
  3. Check out the cdbase “manual”:
    image
  4. Check out what is actually in your cdb:
    image
  5. To access the information of the individual nodes (not max), your code should look something like this:
    Let#LC 71061
    @key N_DISPC #LC $ “Max” force
    Let#UX @UX
    TXE #UX $ Print right away or you overwrite
    Let#node 15
    @key N_DISP #LC #node $ Node forces
    Let#UX @UX
    TXE #UX $ Print right away or you overwrite

Then you might want to add loops etc. I recommend you check out the example in your installation folder.

Thank You, but for individual node it is for me not a problem to check the results. I want to get the max value and the corresponding number of node.

As I said check the examples, the manual and what’s actually in the cdb (database information).

You are diving into the deep end. The code below should solve it, but you are going to have understand the cdb access to understand why.

+Prog Template urs:6
@key N_DISPC 1

Let#Uzmax @Uz $ Max
Let#Uzmin @Uz $ Min (next record)

let#cdb_ier 0
@key N_DISP 1

Loop
Let#Nr @Nr $ Order is important
Let#Uz @Uz
If (#Uz>=#Uzmax) $ Check if you have found the largest
Let#maxnode #Nr
ElseIf (#Uz<=#Uzmi n) $ Check if you have found the smallest
Let#minnode #Nr
EndIf
EndLoop #cdb_ier<2

End

1 Like