×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Change surface color of multi-body solid part

Change surface color of multi-body solid part

Change surface color of multi-body solid part

(OP)
Hello All,

I am able to change PartBody color with a VBA code but having difficulty to change the surface color of multi-body solid part, which has multiple bodies joined together.
When I want to change the "multi-body-PartBody"s color to white, the visible color of all surfaces did not change at all, unless you use the mouse and go to property of each surface on the body and change its color from there manually.

Any suggestions, code syntax, or CATIA command is much appreciated.

Thank you in advance

Quin

RE: Change surface color of multi-body solid part

use the graphic properties wizard to understand where the color comes from.



here the face is white even if all bodies and feature above have other color.

Eric N.
indocti discant et ament meminisse periti

RE: Change surface color of multi-body solid part

(OP)
So surface color and fill color are different? Is it right

Property visProperties.SetRealColor will change surface color or fill color?
As I understand visProperties.SetRealColor only changes surface color...is it right?

Quin

RE: Change surface color of multi-body solid part

it change the color of the selection

Eric N.
indocti discant et ament meminisse periti

RE: Change surface color of multi-body solid part

(OP)
I agree with itsmyjob...but i used visProperties.SetRealColor to change partbody (in the selection) and visible/surface color did not change. See image below.



The above part has multiple surfaces (complex part but single body) with blue color and i tried to change to white with visProperties.SetRealColor 0, 0, 0, 1 but the color did not change to white at all.
However, if I use the same visProperties.SetRealColor 0, 0, 0, 1 to change surfaces on a simpler part then color changes as wanted.

Any idea?

Quin

RE: Change surface color of multi-body solid part

use the property wizard to find out where the color comes from

priority is given to face, then shape, then body.

So if all faces are blue, you can change shape or body to white you will still see the solid blue.

Eric N.
indocti discant et ament meminisse periti

RE: Change surface color of multi-body solid part

(OP)
After running the macro, I still see "blue" color under "Fill" section in the wizard. Does it mean partbody color?

Quin

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources