I have element ID and I need to get the property set ID and its material ID defined in the property. db_element function returns part ID and its not matching with BDF file. Please suggest to get the material ID for an element.
@Boobalan Srinivasan , please reread my comments about appending the desired Nastran MID (PID) to the material (or property) name using a delimiter. In your case, CQUAD 68691 references PID 920 which points to PCOMP 920. That looks correct. Note that the internal Patran DB IDs usually do not match Nastran IDs.
Your example did not have "name.#" in all of the comments, so I did not get matching MIDs when I imported the file.
To demonstrate this behavior, I created a simple example that has 3 material properties referenced by 3 different PSHELLS + 1 composite layup (PCOMP). All materials and properties use the name.### convention to manage IDs when exported and imported.
Also, I modified your PCL to retrieve and dump the material name, and loop thru elements #1-4.
Import the BDF and run the attached session file to see the behavior.
Rephrasing what Darrell said: the relation between material and property IDs in Patran and Nastran is highly dependent on how the user created them and exported/imported them (w/ or w/out the name.### convention).
@Boobalan Srinivasan , please reread my comments about appending the desired Nastran MID (PID) to the material (or property) name using a delimiter. In your case, CQUAD 68691 references PID 920 which points to PCOMP 920. That looks correct. Note that the internal Patran DB IDs usually do not match Nastran IDs.
Your example did not have "name.#" in all of the comments, so I did not get matching MIDs when I imported the file.
To demonstrate this behavior, I created a simple example that has 3 material properties referenced by 3 different PSHELLS + 1 composite layup (PCOMP). All materials and properties use the name.### convention to manage IDs when exported and imported.
Also, I modified your PCL to retrieve and dump the material name, and loop thru elements #1-4.
Import the BDF and run the attached session file to see the behavior.
Rephrasing what Darrell said: the relation between material and property IDs in Patran and Nastran is highly dependent on how the user created them and exported/imported them (w/ or w/out the name.### convention).