Showing results for 
Search instead for 
Do you mean 
Reply

C# API: read out a color of an object

Does anybody know how you can read out a color from an Object?

I am able to set a color, but if I read out, I get an exception.

 

Excample:

TxObjectList objects = TxApplication.ActiveDocument.PhysicalRoot.GetAllDescendants(new TxTypeFilter(typeof(TxRobot)));

 

var color = ((TxRobot)objects[0]).Color.Color.Name;  //Doesn't work

3 REPLIES

Re: C# API: read out a color of an object

Indeed, it does not seem to work...

Re: C# API: read out a color of an object

many people check this function in process simulate.

 

all people see the error of the API code in process simulate.

(API doesn't safe the color of object)

 

can you fix the problem or create a PR for this?

 

thanks

Kind regards,

Benjamin Voelzke

Re: C# API: read out a color of an object

It is better if you contact Siemens hotline so that they open a PR to Core R&D.