Get LlProject direct from file

Hello,

I am currently working in a Print service in .NET and I have come across a problem related with LlProject.
I have differents templates (.lbl, .lst,…) saved in a folder and I want my software to be able to determine which extension has each of them in order to use respectively the classes “ProjectLabel”, “ProjectList”, etc later on.

I have gone through the whole .NET Help file and the only function which could be similar to what I am looking for is “LlUtilsGetProjectType” from LlCore. However, it doesnt seem to work for me. Rather I am not using it properly or it is oriented to files which are in a repository.

I would like to know if there is anyway to get the enum Llproject (list, label or card) direct from the file.

Thanks in advance.

Hi Juan,

Actually LlUtilsGetProjectType is the best choice here. What issues are you encountering when using this API? It works pretty straight forward by looking at the project file header that indicates the type. You can see this when opening the files in an editor. Usage would be

LlProject projectType = LL.Core.LlUtilsGetProjectType(<fullPath to file in question>);

Hi Jochen,

Thank you so much for your answer.

It worked as you said. I could not find the property “Core” for LL in .NET help but the class LLCore and that was I used. I created a new instance from the class LLCore. I used the LL Object as a parameter and then I used “LlUtilsGetProjectType” on it. That did not work.

Since I still am a noob with LL and a bit confused with “Core” (Property and Class) I would like to ask you why that way did not work for me?

Thank you so much

1 Like

Actually, constructing an LlCore object that way is not intended. I’ll have to look if we need to make this constructor private then :wink: . Sorry for the confusion. The correct way is to access the Core property from an existing LL instance.

For a quick start, you might want to look at our tutorial. Besides, feel free to ask questions here, we’re happy to help.