CDBase stab_sct - read cross-section number from Database

Hello Forum!

I am trying to read from the Database the cross-section’s number given the number of a specific bar with no success, like below:

let#stab 1001
let#CDB_IER 0
@key beam_sct 0 #stab
let#qnr_i @(nq) $ Querschinittsnummer

Has anyone an idea of what is missing in this syntax?

With the “@key beam 0 #stab” command, it reads from CDBase just fine. However, when I use the “@key beam_sct” command next, the variable (#qnr_i) yields either in the bar’s number or zero, not the bar’s cross-section number. All of this is performed inside a couple of loops.

Many Thanks to everyone
Raphael

(Sofistik v. 2020, module +template)

Hello Raphael

I have tested your code snippets with versions 2020 and 2023. In both versions I get the correct cross-section number. So maybe your loops are faulty?

Here the test examples:
Version 2020: Durchlaufträger.dat (2.5 KB)
Version 2023: aqb2_1_Durchlauftraeger.dat (2.5 KB)

Best regards
Frederik Höller
Your SOFiSTiK Support Team

Hello Frederik

Thanks for your answer! Indeed, when I use only the snippets with our file, it works perfectly fine.

I further implemented this model for something that is more close to what I am experiencing now. Much more groups, bars and cross-sections, that follow some logic behind.

Please kindly see the file attached.

Now, without changing the +template part from your file, the variable @(nq) leads to the same bar number that it was supposed to read, not the cross-section’s number. This problem I also experienced trying to implement it in my model before.

In the following +template parts, I expanded the idea for reading the CDBase to something that I was aiming for. As you can see with the loops, it works just fine for the “@key beam” and “@key beam_foc”, but not for “@key beam_sct” for some reason… Even without the loops, it cannot read the cross-section number as intended.

It seems that with a small change in the model, the command cannot find the information anymore.

Thanks again and I look forward to see our comment on that.

Best regards
Raphael

Durchlaufträger (1).dat (4.3 KB)