[FEATURE-1478] Get Profiles List (get all user sources)

There is currently no good way to fetch the list of all configured user source profiles from a script. From gateway scope, you could use this for now, but just know it depends on internal data structures which (though not likely to change in the foreseeable future) may change:

	from com.inductiveautomation.ignition.gateway import IgnitionGateway
	from simpleorm.dataset import SQuery
	from com.inductiveautomation.ignition.gateway.user import UserSourceProfileRecord
	query = SQuery(UserSourceProfileRecord.META).ascending(UserSourceProfileRecord.Name)
	results = IgnitionGateway.get().getPersistenceInterface().query(query)
	userSourceProfileNames = []
	for result in results:
		userSourceProfileNames.append(result.getName())
	return userSourceProfileNames
3 Likes