cancel
Showing results for 
Search instead for 
Did you mean: 

how to set temporary color for element

Creator
Creator

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.

2015-10-19 10-46-59.png

but, this funtion only set element edge color,

2015-10-19 10-39-33.png

Is there some wrong whit my code?

3 REPLIES

Re: how to set temporary color for element

Siemens Phenom Siemens Phenom
Siemens Phenom

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:

 

elemInfo.png

Re: how to set temporary color for element

Siemens Phenom Siemens Phenom
Siemens Phenom

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.

Re: how to set temporary color for element

Creator
Creator

Smiley Sad This method is very  complexity and inefficient.Onec my group elements change,i must merge useless meshes and   extract new meshes.