Set resource availability and hourly cost via macro

K.-M. H. shared this question 4 months ago
Discussion Open

Happy new year to all!

I regularly add resources to mindmaps via a macro:

MapMarkerGroups
.GetMandatoryMarkerGroup(mmMapMarkerGroupTypeResource)
.AddResourceMarker(…)
 Now I would like to set the resources’ availability (in hours per week) and the hourly cost as well. However, I couldn’t find the right way to do it. 

Would someone point me into the right direction, please?

Kind regards!

Best Answer
photo

I may be wrong but I don't think this data is exposed in the API. There is no "Resources" collection in the Document object, which is where I would have expected it. The resources used on topics are accessible in the mandatory marker group you mention, but this only returns a collection of generic MapMarker objects. The MapMarker object does not expose ResourceAvailability and ResourceRate properties, which is a pity since they are defined in the map XML for resource markers. I don't think there is a realistic way to write to the document XML through the API, though.

Replies (1)

photo
2

I may be wrong but I don't think this data is exposed in the API. There is no "Resources" collection in the Document object, which is where I would have expected it. The resources used on topics are accessible in the mandatory marker group you mention, but this only returns a collection of generic MapMarker objects. The MapMarker object does not expose ResourceAvailability and ResourceRate properties, which is a pity since they are defined in the map XML for resource markers. I don't think there is a realistic way to write to the document XML through the API, though.

photo
1

Thanks for the answer, Nick! At least I don’t need to feel sad because I didn’t find it.

---