Now i split some elements into some groups(these group are not actual create) use my method,i want set different temporary color for these group. so i use "UF_SF_temp_display_element" function to do it.
but, this funtion only set element edge color,
Is there some wrong whit my code?
Nothing wrong with your code. This function is just meant to provide temporary display of some element attributes. It will only highlight edges - exactly what is done internally in, for example, the element information command selection:
To your original problem: there is no way to set element colors independently. CAE.FeElement inherits from TaggedObject, not DisplayableObject and has no color property.
The only way to color elements is by setting the mesh color. You can use the extract command to extract your groups of elements into separate meshes and set the colors of those meshes independently. CAE.Mesh does inherit from DisplayableObject and does have a color property than can be set.
This method is very complexity and inefficient.Onec my group elements change,i must merge useless meshes and extract new meshes.