How to identify columns in 3D system using CDB with python

Dear All,

I am trying to obtain the reaction forces/support forces in the Z direction for only columns. As the model was created in 3D, no springs were defined and I have only 25000 nodes to work with.

Upon examining the sofistik graphic, I noticed that the nodes at columns are represented as numbers of Fixed Nodes, as shown in the attached image.

To access them using the Python interface in CDB, I came across KFIX in this SOFiSTiK forum post and tried the provided Python code. The output I am receiving is in string format, for example:

  • 1147 - “PZ”
  • 127 - “”
  • 88 - “PPMZ”

However, I am unsure how this information will assist me in filtering the nodes. If anyone has any thoughts on this issue, please let me know.

ie = c_int(0)
nodes = {'Node':[], 'X':[], 'Y':[], 'Z':[]}
while ie.value < 2:
   datalen.value = sizeof(CNODE)
   RecLen = c_int(sizeof(cnode))
   ie.value = py_sof_cdb_get(Index, 20, 00, byref(cnode), byref(RecLen), 1)
   nodes['Node'].append(cnode.m_nr)  # node-number
   nodes['X'].append(cnode.m_xyz[0]) # x coordinates
   nodes['Y'].append(-cnode.m_xyz[1]) # y coordinates
   nodes['Z'].append(cnode.m_xyz[2])  # z coordinates
   # Always read the length of record before sof_cdb_get is called
   RecLen = c_int(sizeof(cnode))
nodes = pd.DataFrame.from_dict(nodes)

node_forces = {'LF':[],'NR':[], 'P [kN]':[]}
LF = [2156]
for lf in LF:
   ie = c_int(0)
   while ie.value < 2:
      datalen.value = sizeof(CN_DISPC)
      RecLen = c_int(sizeof(cn_dispc))
      ie.value = py_sof_cdb_get(Index, 24, lf, byref(cn_dispc), byref(RecLen), 1)
      if cn_dispc.m_id >0:
        node_forces['P [kN]'].append(cn_dispc.m_pz)

    # Always read the length of record before sof_cdb_get is called
   RecLen = c_int(sizeof(cn_dispc))

Hello guys,
Somebody please help me. I need to submit this work in couple of days.

If I understand correctly, your task is to find the support loads of the columns. The wall supports should be suppressed.

I suggest two possible methods:
a) Using the normal force of the beams may be easier to filter.
b) Another possibility is to find the support nodes using the start/end nodes of the SLNs. I would do this outside python and use the node numbers later in the python code (especially if it is urgent and I only have to work with one model), but it should be possible inside python too.


Thanks @gmay for your response. Yes you are correct. I need reaction forces at the column only (exclude other node).
I need to find a a standard solution to filter these nodes because I need to use this solution in the future for different projects as well.

I attempted to search for any irregularities or patterns in the Normal forces of the beams (although I am not an expert in structural engineering) in order to determine the support forces for the columns. However, I did not discover anything noteworthy. I also observed that when attempting to select the column, it appears to be composed of several beam elements.

Regarding your second suggestion, I am unsure what you mean by “SLNs”. If you are referring to structural line nodes, I do not believe the column is modeled as a line, as it is composed of beam elements, as shown in the image below.

I have some strong feeling that the example provided by Sofistik at this link can help me find the fixed nodes, but I am having trouble understanding the solution.


I found a workaround procedure. In my project KFIX = 120represents columns.
I will go with that filter for now

Thanks everyone.