Resourcetype module id and types reference?

Trying to find what the moduleid and typeid would be for project script resources, perspective views, etc. Is there a list of what these exact values are for different resource types?

Ah, was able to find what I needed by just getting a project resource of the type and calling getModuleId and getTypeId.

bumping this back up, as I'm running into this issue again with resources that arent located in the resource tree. For something like the resource com.inductiveautomation.perspective\session-props, where would I find information on what the String 'typeid' that ignition considers it as?

For instance, when trying to get a specific resource from a string of the path, you have to have the path, and the correct ResourceType

But if you want to see this resource type, you first need the resource in order to call "getResourceType" or something of the like. And looking through the getAllResources Map can get the resource, but in order to pull it out of the map you need the ResourceId, which can only be constructed from a ProjectResource. And inspecting the map in debug does not show the type id

I may just be missing something overall, but I feel stuck in a Catch-22

EDIT: nevermind, the map does show it, just had to dig a bit deeper

There isn't anything like a central directory. The project system isn't really built around the idea that some outside module or process is going to need to know about all resource types, but rather that each subsystem knows about its own resources.

Most resources have the ResourceType specified as a static field on the class. In this case, SessionPropsConfig.RESOURCE_TYPE would be your static reference to it. Your module would need to depend on the Perspective module in order to access it, though.

1 Like

thank you! exactly the kind of thing i was looking for