KitchenDraw SDK 2
Show / Hide Table of Contents

Property FinishesConfigString

FinishesConfigString

The character string representing the finishes configuration of the object.

Declaration
public string FinishesConfigString { get; set; }
Property Value
Type Description
string
Remarks

The character string has the following format: -1,10005,10006,10007,20022,20023;;1,2,1,4,9,7

At the left hand side of ;;, we can find the finish type ranks separated with commas.The -1 rank represents the front model; the 1XXXX ranks represent the model finish types and the 2XXXX ranks represent the family finish types.

At the right hand side of ;;, we can find the positions(kind of ranks numbered from 0 and separated by commas) of the finishes corresponding respectively to the finish types listed previously.Each value represents the position of the selected finish in the list of the available finishes for the corresponding finish type.

You can use Scene.FinishesConfig class to manipulate this character string.

To set new finishes config for the object, you can pass either the entire finishes config string, or just its right hand side.

Examples

The following example shows how to manipulate an object's finishes config using the Scene.FinishesConfig class.

public void SetFrontColourToWhiteIfAvailable(Scene.Object obj)
{
    // This methods sets front colour of given object to white, if such
    // an option is available.

    // Let's parse object's finishes config string to access individual
    // finishes and types.
    var finishesConfig = new Scene.FinishesConfig(obj, obj.FinishesConfigString);

    // Now let's find "Front colour" finish type.
    Appli.CatalogFinishType frontColorFinishType;

    if(!finishesConfig.TryGetFinishTypeByName("Front Colour",
            out frontColorFinishType))
    {
        // This object doesn't utilize "Front colour" finish type.
        return;
    }

    // Now let's find "white" finish in the finish type.
    Appli.CatalogFinish whiteFrontColor;

    if(!frontColorFinishType.TryGetFinishByName("white", 
        out whiteFrontColor))
    {
        // This object doesn't have "white" front color option.
        return;
    }

    // Let's set white front colour to the finishes config.
    finishesConfig[frontColorFinishType] = whiteFrontColor;

    // And now let's assign the result back to the object to apply the
    // result.
    obj.FinishesConfigString = finishesConfig.ToString();
}
In this article
Back to top Generated by DocFX