×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

API: General Section

API: General Section

API: General Section

(OP)
Hi all

I have a question that hopefully somebody can answer.

I you have done any API programming in Femap you may know that there are methods to create cross sections for line elements. As far as I know these methods are based on the standard parametric cross sections, like a tube with radius and thickness.

But there is a general section based on a surface. Basically I can draw a cross section and Femap will calculate all the section data. I can also do that but what I would really like is to be able to program the cross section so the graphics in the model would look correct.

Is there a way to send the cross section directly into the beam properties shape dialog as a coordinate matrix or anything similar? I can't find any info on this in the manuals.

Best regards

Thomas

RE: API: General Section

Hello Thomas,

Bar/beam shapes are dealt with at property level in FEMAP (just like in NASTRAN), so you'll find this in the property object. Use the "ComputeGeneralShape" method, it will compute all necessary properties and update your beam/bar property with regard to the surface you give in the "surfaceID" parameter.

For example let's say I have the following objects in my model and code:
- pr is a feProp
- vec1 = vector [0,0,1]
- surface #1 is a square
Then the following code will create a property with the surface defining its section (square bar):
(the first line is essential because FEMAP needs to know what type of property you're dealing with)

pr.type = FET_L_BAR
pr.ComputeGeneralShape(1,vec1,FSOR_UP,FSEV_AUTO,True, True, True)
pr.Put(pr.NextEmptyID)

Hope this helps!

RE: API: General Section

(OP)
Hello APav

I am actually trying to take things a bit further. I don't want to draw the surface at all. I want to define in by coordinates (four corners in a square) and somehow send that matrix into Femap. Do you know if that is possible?

Thomas

RE: API: General Section

I'm not sure that's possible.

In the propertiy object's "additional property" you have the "outline" attribute which is similar to what you're looking for, but it might be read-only. Plus I'ld expect that FEMAP needs a whole lot more information like area, inertia...etc... which are computed when calling ComputeGeneralShape.

I would recommend this: use App.feBoundaryFromPoints to create a surface with an array of point coordinates, then give that surface to ComputeGeneralShape. Delete the surface afterwards if you want, in FEMAP v11.1 the nifty "TrackData" object will easily get you the surface's ID.

RE: API: General Section

(OP)
APav

I use the Prop.pval function to send all the property data into Femap. So far I have solved all the standard sections like tubes, W-flanges etc. But there are guite a few sections that are non-standard. That means they are not parametric in Femap. To compute the section data with Femap would be nice but that is actually not the primary idea, it is the graphic presentation (eye candy smile).

And I don't want to draw the sections I just want a dialog box and parameters. Then I can write a code that sends data into the general section. But it may be impossible today. I don't know but there is, in my experience, a lot of things in the api that is not in the documentation.

Hence, my question.

Thomas

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources