CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Mesh Generation & Pre-Processing Software > ANSA

Get ID of property

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 15, 2020, 05:21
Default Get ID of property
  #1
New Member
 
mugiwara
Join Date: Sep 2018
Posts: 2
Rep Power: 0
h47123d is on a distinguished road
Hello,
I'm trying to get the ID of some(selected properties) however I'm getting an empty list back.

I`m trying to achieve this using the GetEntityCardValues function.

Already succeded with getting the T(thicknesses) of given properties, example:
card_value1 = "T"

for pid in properties:
thickness_list.append(base.GetEntityCardValues(dec k, pid, card_value1))

returns: [{'T': 2.0}, {'T': 5.0}, {'T': 4.0}, {'T': 4.0}, {'T': 4.0}, {'T': 4.0}]

however when I try to get IDs like :
card_id = "__id__"
(or card_id = "ID")

and
for pid in properties:
id_list.append(base.GetEntityCardValues(deck, pid,card_id))

I get back this :

[{}, {}, {}, {}, {}, {}]

Any ideas why this happens?
Maybe solutions? thanks
h47123d is offline   Reply With Quote

Old   August 19, 2020, 23:38
Lightbulb
  #2
New Member
 
RAJALINGAM MANICKAM
Join Date: Mar 2018
Location: Hyderabad
Posts: 3
Rep Power: 8
MRAJALIN is on a distinguished road
Dear mugiwara,

If my understanding is right, you are trying to get the ID of collected properties. For that you have to pass correct key in the parameter. Always try to use the key same as from the edit card. ID key will be differ based on the deck you defined.

Else you can directly get the ID of the property by using "property._id" command. This command is common for all the decks. So you can try this.

try this code to get the ID of collected properties.

def test():
id_list = []
Pids = base.CollectEntities(constants.NASTRAN, None, "__PROPERTIES__", True)
for pid in Pids:
id_list.append(pid._id)
print(id_list)
test()


Regards,
Rajalingam.M
MRAJALIN is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to define thermal property "Expansion" in Fluent raghuramswaroop FLUENT 1 June 18, 2018 09:38
frozen-in property of vortex line mb.pejvak Main CFD Forum 1 July 25, 2013 07:09
How to define the liquid property? alloveyou CFX 1 April 25, 2012 05:34
how to find property for compressible flow jai CFX 2 August 3, 2009 21:09
URGENT custom property for UDF Sandilya Garimella FLUENT 0 May 19, 2008 12:35


All times are GMT -4. The time now is 01:42.