Styles in C API

I’m trying to disable the profile edges using the C API. Here’s my code (I removed errors checking for simplicity)

SUStylesRef styles = SU_INVALID;
SUModelGetStyles(model, &styles);
SUStyleRef style = SU_INVALID;
SUStylesGetActiveStyle(styles, &style);
SUTypedValueRef profilesEnabled = SU_INVALID;
SUTypedValueCreate(&profilesEnabled);
SUTypedValueSetBool(profilesEnabled, false);
SUStyleSetProperty(style, SUStyleEdgesProfilesEnabled, profilesEnabled);

This doesn’t work, the generated .skp file has profiles enabled.

Am I missing something?

I’m not sure about Styles. Could you use SURenderingOptionsSetValue?

1 Like

Indeed that works! Thanks a lot Jim

The options name is DrawSilhouettes by the way, not very consistent with the UI or the rest of the API.