Setting project type from a string

I know you can set the ProjectType from the Project on disk. Is there a way to do the same from a string?

oLL.AutoProjectType = oLL.Core.LlUtilsGetProjectType(ProjectName).

I think combit only has the function for a project with path specification or from the repository. For a string it can be difficult, because the passed string can be very different.

But you can easily help yourself with your own function, e.g. like this (here the default endings are used).

    public LlProject projectType(string projectPath)
        var projectExt = Path.GetExtension(projectPath);

        return projectExt switch
            "lst" => LlProject.List,
            "lbl" => LlProject.Label,
            "crd" => LlProject.Card,
            _ => LlProject.Unknown
1 Like

Yep, we are doing that now just wanted to double check if there was a built in helper class such as ExportEnumHelper.


Thank you!!

© combit GmbH