getResources() returns one Resource more than visible in MSProject

Hello,
I use Aspose.Tasks for Java, 22.9.

When I call getResources() for a project, I obtain a collection which contains one more Resource than visible in MSProject. This Resource:

  • has always index 0
  • has name "0 "
  • has some strange type (“bze$a” - likely obfuscated code) while the other collection elements have the proper type “Resource”

The API reference doesn’t mention any specialties for getResources().

What is the reason and how to fix it?
(deleting the 0-index element is a workaround but an ugly…)

Regards
Piotr

getResource_MSP.png (2.5 KB)
getResource_Debug.png (14.1 KB)

@piomal,
could you check this answer:

Shortly put, it’s a service resource created by MS Project.
Currently you can use getIsRoot() flag to filter it out.

We will consider removing it from project.getResources() collection in a future release as there is no user scenario where the root resource can be used.

Many thanks.
The hint with “isRoot()” allows mit to properly work with this collection.

1 Like