Hello Alexey!
The code you provided works great.
I do performe some multiple chunks manipulations, but before deletion i have only one chunk. I am dead sure that variables that i have points to the target chunk and target document.
The last code i've tried is:
def remove(self,
tie_points=False,
dem=False,
ortho=False,
):
if tie_points:
try:
self.chunk.tie_points = None
except:
print('Не удалось удалить точки')
pass
if dem:
try:
self.chunk.remove(self.chunk.elevation)
except:
print('Не удалось удалить дем')
pass
if ortho:
try:
self.chunk.remove(self.chunk.orthomosaic)
except:
print('Не удалось удалить ортофото')
pass
self.doc.save()
it only prints 'Не удалось удалить ортофото', which means it perfoms other operations without exeption.
After that, the project doesn't have pointers to DEM or orthomosaic, but the size of the files is the same as without any deletion.
With code you provided, everything worked fine.
I'll try to implent it within my programm, thank you for answering.