Cancel
Showing results for 
Search instead for 
Did you mean: 

Adding BC Nodes to a SET in FEMAP API

Creator
Creator

HI

 

I need to add BC Nodes to a set.

 

I could able to do it for the activeset but I am having 7 Sets with different boundary conditions at different nodes and I need to create a set for all these nodes.

 

I tried the following code but it doesnt help. It taking the active set nodes only for all the sets.

 

n=outset.countset

For OutputSetID = 1 To n

femap.feViewRegenerate (0)
feView.Get (viewID)
rc = outset.Get(OutputSetID)

rc = AnalysisMgr.Reset
rc = outset.Get(OutputSetID)

While AnalysisMgr.Next()
rc = AnalysisMgr.Get(AnalysisMgr.ID)

If outset.Title = AnalysisMgr.Title Then

BC_ID = AnalysisMgr.BCset(0)

BCset.Active = BC_ID
rc = BCset.Get(BC_ID)


rc = feView.Put(viewID)
rc = femap.feViewRegenerate(0)
rc = femap.feViewRedraw(0)

rc = feBCNode.First()

While feBCNode.ID < 99999999
nd.Get (feBCNode.ID)

rc = nodeSet.Add(feBCNode.ID)
nb_node = nodeSet.Count

rc = feBCNode.Next()

Wend

End If

Wend

Next OutputSetID

 

 

Can anybody help on this please?

 

Karthikeyan M

2 REPLIES

Re: Adding BC Nodes to a SET in FEMAP API

Siemens Phenom Siemens Phenom
Siemens Phenom

To loop over all the Nodal Constraints in a set, 

 

Set the setID on the Nodal Constraint to the set you're working with, then when you do a .Next it will get the next one in that set, the .Reset makes sure you're starting with the first one -

 

feBCNode.setID = BC_ID

feBCNode.Reset

While feBCNode.Next

    nodeSet.Add( feBCNode.ID)

Wend

 

 

Mark.

 

Re: Adding BC Nodes to a SET in FEMAP API

Creator
Creator

Thank You Mark. It worked.