Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations JAE on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

feRenumberOpt

Status
Not open for further replies.

aleximos

Civil/Environmental
Joined
Dec 7, 2011
Messages
29
Location
DE
Hey folks,

I'm using the API command feRenumberOpt for renumbering a set of entities. But if I try to edit these entities later in my algorithm, they have the older IDs. Is there a way to edit them according to the new renumbered IDs.

Thanks in advance

Alexandros

 
Hello,

I'm on v11.1.1 and don't have the problem you describe. For example create a new model with only one element and run the code below. For me FEMAP returns 1 then 10000, therefore the ID has been updated.

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

Dim el As femap.Elem
Set el =App.feElem

el.First
App.feAppMessage(FCM_NORMAL,CStr(el.ID))

App.feRenumberOpt(FT_ELEM,-el.ID,10000,0,0,False,False,False)

el.First
App.feAppMessage(FCM_NORMAL,CStr(el.ID))
End Sub


Are you using sets? If yes the IDs in the sets will not be updated. A set is a list of numbers, a set has no idea what it contains and it can therefore not update anything. That would be a group.

AP
 
Thanks for the answer!
Yes I'm using a set. So I guess it would be better if I make a temporary group.
 
There are workarounds, depending on how you prefer your code to work.
Perhaps the trackdata object works when renumbering, I've never tested that scenario.
But the underlying concept is the same: you could use a first set with all elements for ex, then renumber, then make a second set with all elements again, then set2-set1 = the elements which have been renumbered.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top