Cancel
Showing results for 
Search instead for 
Did you mean: 

Change the color of an animatible object (MU->Make Animatible Object)

Creator
Creator

Dear Community,

I have a problem with the attached model, concerning the change of the MU color.

At first I duplicated the standard MU and made a "Animatible Object" from it to configure its joint. Afterwards I created a pose in the "3D-Properties-Dialog" to be able to rotate the MU for -90° with Simtalk.

The following steps should be processed with the MUs at the conveyor:

  1. If the MU reaches the sensor then activate the configurerd rotation-pose
  2. Wait until the rotation is completed
  3. Change the color of the MU to red

My code for step three doesn't effect the colorchange, so the MUs stay white.

@._3D.activateMaterialWithColor(makeRGBValue(255,0,0))

Has anybody an idea how to solve this problem with Simtalk?

 

I have attached an overview screenshot from the model and the important methodes aswell as the model itself. The model was created in 3D with Plant Simulation V14.2 (Update 3).

 

2 REPLIES 2

Re: Change the color of an animatible object (MU->Make Animatible Object)

Phenom
Phenom

The graphic, you want to color, is

 

located in the PartAnimation hierarchy.

 

Therefore you have to address it in

 

this hierarchy level (s.b.)

 

Unbenannt.PNG

 

 

Re: Change the color of an animatible object (MU->Make Animatible Object)

Creator
Creator

Thanks for your quick reply simulator Smiley Happy

Your solution works perfectly fine.

 

Best regards

Christoph