News:

SMF - Just Installed!

Main Menu

Change work part texture

Started by Luis_IngSL, December 22, 2009, 08:35:47 AM

Previous topic - Next topic

Luis_IngSL

I need to change the work part's texture when passes across some elements.
How can I do it?
Thanks.

EasyPLC_Master

#1
You have several options:

  • Create as WorkParts as you need with different texture for own WorkPart and add for each one different property types. Place a WorkPartModifier element in the place where the WorkPart must be change, and configure the Source WorkPart Type and the Transformed WorkPart Type. Next you can assign a PLC output to command when the WorkPartModifier must be active, this is, when this component will change for one WorkPart to other always that the source WorkPart will touch the WorkPartModifier element. If you want that this change will be always without PLC action then place a 0 like PLC Output
  • Use the script code in the Installation's Logic Program:with the sentence BoxObject searchPart.texture = Editor.GetTexture(@"TextureCategory\texture.jpg");. With this sentence you will be able to change the workpart texture.
  • Create a customized Component with the WorkPart property to true and write in the code property the behaviour you need.

I attach two examples about the two first points.

[attachment deleted by admin]

Luis_IngSL

The examples were very helpful. Thank you very much.