'NoneType' object has no attribute 'id'

Post Reply
juanca10
Posts: 11
Joined: Mon Jan 22, 2024 5:06 pm

'NoneType' object has no attribute 'id'

Post by juanca10 » Wed Jan 24, 2024 5:11 pm

Is there any way to know exactly the element error? i know it should be a solid beacuse irs a brick element but cant find it
error.png
error.png (216.72 KiB) Viewed 3645 times
Hi im trying to replicate the pile soil interaction webinar. Its my first time using stko so im havng lots of isues. Can anybody explain me step by step since the design process? Id like to do the same but chnging the soil with diferents altitudes. Tanks!

juanca10
Posts: 11
Joined: Mon Jan 22, 2024 5:06 pm

Re: 'NoneType' object has no attribute 'id'

Post by juanca10 » Wed Jan 24, 2024 5:12 pm

also attached the file im working with
MODELO2.rar
(235.01 KiB) Downloaded 367 times
Hi im trying to replicate the pile soil interaction webinar. Its my first time using stko so im havng lots of isues. Can anybody explain me step by step since the design process? Id like to do the same but chnging the soil with diferents altitudes. Tanks!

STKO Team
Posts: 3069
Joined: Tue Oct 29, 2019 8:45 am

Re: 'NoneType' object has no attribute 'id'

Post by STKO Team » Thu Jan 25, 2024 9:37 am

Use this script:

Code: Select all

from PyMpc import *

App.clearTerminal()
doc = App.caeDocument()

for _, geom in doc.geometries.items():
	ep_asn = geom.elementPropertyAssignment
	pp_asn = geom.physicalPropertyAssignment
	# solids
	for solid_id, ep_item in enumerate(ep_asn.onSolids):
		if ep_item:
			# this solid has a property
			# let's see if it also has a property
			if not pp_asn.onSolids[solid_id]:
				print('Geom {} - Solid {} Has Element "{}" but No Physical Property'.format(
					geom.id, solid_id, ep_item.name))
It will print the sub-solids of all geometries that have an element property but no physical property (that is what is causing the error)
SCRIPT.png
SCRIPT.png (219.84 KiB) Viewed 3617 times

juanca10
Posts: 11
Joined: Mon Jan 22, 2024 5:06 pm

Re: 'NoneType' object has no attribute 'id'

Post by juanca10 » Thu Jan 25, 2024 12:19 pm

Thanks so much!!
Hi im trying to replicate the pile soil interaction webinar. Its my first time using stko so im havng lots of isues. Can anybody explain me step by step since the design process? Id like to do the same but chnging the soil with diferents altitudes. Tanks!

juanca10
Posts: 11
Joined: Mon Jan 22, 2024 5:06 pm

Re: 'NoneType' object has no attribute 'id'

Post by juanca10 » Thu Jan 25, 2024 12:26 pm

The analysis run but i'v got ow this message from the console
ERROR_2.png
ERROR_2.png (95.21 KiB) Viewed 3604 times
Hi im trying to replicate the pile soil interaction webinar. Its my first time using stko so im havng lots of isues. Can anybody explain me step by step since the design process? Id like to do the same but chnging the soil with diferents altitudes. Tanks!

STKO Team
Posts: 3069
Joined: Tue Oct 29, 2019 8:45 am

Re: 'NoneType' object has no attribute 'id'

Post by STKO Team » Thu Jan 25, 2024 1:51 pm

share your update file

juanca10
Posts: 11
Joined: Mon Jan 22, 2024 5:06 pm

Re: 'NoneType' object has no attribute 'id'

Post by juanca10 » Thu Jan 25, 2024 2:01 pm

MODELO2corregido.rar
(235.13 KiB) Downloaded 403 times
Hi im trying to replicate the pile soil interaction webinar. Its my first time using stko so im havng lots of isues. Can anybody explain me step by step since the design process? Id like to do the same but chnging the soil with diferents altitudes. Tanks!

Post Reply