Agreed the AI is getting better and can produce code that does what you expect. 1 year ago, it was absolute useless.
But it still creates lots of rather garbage code, burning energy in the process.
I wouldn't call it intelligence. It uses a sledgehammer method of puzzling together code snippets it found online, in a statistically best fit order and shuffling them around until they deliver a result that is acceptable.
All it basically needs is,
from Trimble.Vce.Data import MediaFolderContainer
from Trimble.Vce.Core import GlobalSelection
# clear the global selection
GlobalSelection.Clear()
selectserials = []
for mf in MediaFolderContainer.ProvideMediaFolderContainer(self.currentProject):
#selectserials.Add(mf.SerialNumber) # if you want to add the media files to the selection list
selectserials.Add(mf.AnchoringObject.SerialNumber) # add the point itself to the selection list
# apply the list we compiled to global selection
GlobalSelection.Items(self.currentProject).Set(selectserials)
------------------------------
Ronny Schneider
------------------------------