Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Retrieve value from array of dictionary : Python

Tags:

python

abaqus

I have the below as output from an application which I am trying to customize using Python.

({'featureName': 'Solid extrude-1', 'index': 6, 'instanceName': None, 'isReferenceRep': False, 'pointOn': ((-71.25, 18.75, 20.0),)})

I want to get the Coordinate values ( 'pointOn' key) from this variable.

I am not sure if this is array of dictionary or something else.

like image 962
Ajit C Avatar asked Aug 09 '26 12:08

Ajit C


1 Answers

What you got is actually an object. Abaqus just overwrites implementation of __str__ method, so that output looks like something else.

If your object is assigned to name Point1, try accessing members in the following way:

Point1.pointOn
Point1.featureName

In general, Abaqus usually either returns a repository (collection) of objects or a single objects. Rarely can you get something other than that.

like image 60
hgazibara Avatar answered Aug 12 '26 03:08

hgazibara