Cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

Femap API: Set Double-Sided Planar Output using User Output Sets

Valued Contributor
Valued Contributor

Hi Everyone,

concerning plate elements, I can't understand how to associate an User Output Vector to the top or the bottom layer of plate elements in order to use the Double-Sided Planar option when plotting my Output Vectors.

 

A simple example:

Supposing that a scalar value equal to 1 is stored in vector 9000000 and -1 is stored in 9000001 for all plate elements, how can I get the Double-Sided contour plot showing 1 on all positive faces and -1 on all negatives?

 

Many thanks

 

Za

5 REPLIES 5

Re: Femap API: Set Double-Sided Planar Output using User Output Sets

Genius
Genius

Is this what you're looking for?:

 

Sub Main
    Dim App As femap.model
    Dim viewID As Long
	Dim feView As femap.View

    Set App = feFemap()
	Set feView = App.feView

	App.feAppGetActiveView( viewID )

	feView.Get(viewID)
	feView.ContourVector1 = 9000000 'top
	feView.ContourVector2 = 9000001 'bottom
	feView.Deformed = FDF_DEFORMED
	feView.Contour  = FCF_CONTOUR

	rc = feView.Put( viewID )
	rc = App.feViewRegenerate( 0 )

End Sub
Maarten Elings | Engineer

Re: Femap API: Set Double-Sided Planar Output using User Output Sets

Valued Contributor
Valued Contributor

Thanks for helping me, unfortunately this is not what I was looking for. Your code displays the first vector along with the second, but it is useful only when entity IDs associated with the first vector are not in the second and viceversa (such as Plate Von Mises and Beam Max Combined), because only one value can be plotted for each element.

I'm trying to get 1 plotted on the top layer and -1 on the bottom layer, as you can obtain by plotting "7020..Plate Top X Normal Stress" and selecting "Double-Sided Planar" ("7420..Plate Top X Normal Stress" is displayed on the bottom layer).

Femap is able to set an "association" between the Top and the Bottom Output Vectors that is clear when you click on "Add Similar Layer" in a Select Result Dialog Box (see the attachment). This "association" is likely what I am trying to set using API.

 

Za

Re: Femap API: Set Double-Sided Planar Output using User Output Sets

Siemens Phenom Siemens Phenom
Siemens Phenom

The Double-Sided checkbox applies for vectors with specific offsets (+200, +400, etc.), but does not apply to in the range of 9,000,000.

 

You can do something like below, either in a new Results Set or find an unused "pair" of vectors (like 7020 & 7420).

 

(view in My Videos)

 


Sub Main
    Dim App As femap.model
    Set App = feFemap()

    Dim o As Output
    Set o = App.feOutput

    o.SetID = 2
    o.Get( 9000000 )
    o.Put( 7020 )

    o.Get( 9000001 )
    o.Put( 7420 )

    
End Sub

Re: Femap API: Set Double-Sided Planar Output using User Output Sets

Valued Contributor
Valued Contributor

I already tried to set +400 offsets, both with IDs >9,000,000 and IDs from IDs 6,000 to 59,999 (Plate Element Output), but unfortunately I can't get through. Probably 7000 and 7400 are special IDs...

Re: Femap API: Set Double-Sided Planar Output using User Output Sets

Valued Contributor
Valued Contributor

Now that I had a moment to test it, I noticed that the IDs between 7040 and 7090 (generally unused) in pair with those between 7440 and 7490 are available for this usage.

For example, it is possible to use 7050 and 7450 and get the result without overwriting used vectors or generating a new output set.