Welcome to the forums. Please post in English or French.

You are not logged in.

#1 2021-03-22 08:57:14

Igor Barcelos
Member
Registered: 2020-03-20
Posts: 15

[SOLVED] EXTR_TABLE does not work

Hi everyone!

For the last two days, I have been struggling in using EXTR_TABLE to access the Code_Aster concepts in the python environment.  I have tried with the Linux and windows CA  version and I get the same error. 

" AttributeError: 'tuple' object has no attribute 'EXTR_TABLE'   "

I'm attaching all the necessary files of my model, which is quite simple: bending of a simply supported beam.

Do you have any ideas on how to solve this problem?

Thank you!

Last edited by Igor Barcelos (2021-03-22 12:29:33)


Attachments:
bending_beam.rar, Size: 7.21 KiB, Downloads: 96

Offline

#2 2021-03-22 09:22:13

konyaro
Member
From: Genève
Registered: 2016-04-02
Posts: 262

Re: [SOLVED] EXTR_TABLE does not work

Hello,
your object TBL is a tuple. If you do TBL[0].EXTR_TABLE(), it works. Nevertheless i don't know why it is a tuple...

Konyaro


失敗は成功のもと (L'échec est la base de la réussite)

Offline

#3 2021-03-22 11:22:23

GPSalachs
Member
Registered: 2018-03-10
Posts: 244

Re: [SOLVED] EXTR_TABLE does not work

You could also try to

TABLE = TAB.EXTR_ΤΑBLE()

Values = TABLE.valeurs()['PARAM']

If i remember correctly it is found in the documentation regarding python objects.

Offline

#4 2021-03-22 12:33:42

Igor Barcelos
Member
Registered: 2020-03-20
Posts: 15

Re: [SOLVED] EXTR_TABLE does not work

konyaro wrote:

Hello,
your object TBL is a tuple. If you do TBL[0].EXTR_TABLE(), it works. Nevertheless, i don't know why it is a tuple...

Konyaro

Big thanks, Konyaro. That solved the problem.. although is not clear why my object is a tuple.

@GPSalachs The syntax presented in the documentation about python objects did not work for me in this case. Don't know why.

Offline

#5 2021-05-03 17:47:09

windy_concrete
Member
From: Saint Paul, MN USA
Registered: 2020-10-15
Posts: 17

Re: [SOLVED] EXTR_TABLE does not work

I had this issue in CodeAster for Windows. Today in Python script I executed print(type(TABLE)) of Konyaro's output object. This directed me to the Utilitai.py package and the table.py script therein. On examination of file "table.py" I was able to see the main attributes, self.rows, self.type, etc. for the entries in table class.

The bottom line here is that you get an object from POST_RELEV_T that is a legacy CodeAster object. (object = POST_RELEV_T...)

Then you convert this object and assign it as object2 = object.EXTR_TABLE()

This 'object2' is now of the type Utilitai.TABLE.table and you can access it with dictionary calls to TABLE.rows[#]['param']

If this is not clear and more is needed please post reply and I will try to help more.

Kirk


MS Structural Engineering and 15 years in shore-based wind turbine foundations. Code_Aster / Salome-Meca newbie.

Offline