feRenumberOpt
feRenumberOpt
(OP)
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
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





RE: feRenumberOpt
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
RE: feRenumberOpt
Yes I'm using a set. So I guess it would be better if I make a temporary group.
RE: feRenumberOpt
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.