I want to trigger the painting setting through the code in the following code, but it fails to execute properly and shows an error. Where did I make a mistake? Thank you.
That command takes a bool parameter, and only opens or closes the UI for it. I think there is no API to prepare components for painting programmatically.
What the “Prepare for painting” does is collect all triangle meshes (ITriangleSet) from all node’s geometry (ISimNode.Geometry) of the selected component and then call
In your .NET code you should change PaintProperties.PAIN_PREPARED to “PaintPrepared”.
Remove the code you have about getting and executing “PrpareForPaiting”, there is no need.
In your Python script, you should check if the component has the PaintPrepared property.
How does this get back to its old color
I want to use python program to achieve this, I have studied for a long time, I will pay you, can you help me to achieve it? Thank you very much