Forum

Author Topic: Designate Chunk as active chunk  (Read 2399 times)

danderson4

  • Newbie
  • *
  • Posts: 14
    • View Profile
Designate Chunk as active chunk
« on: February 03, 2023, 02:16:11 AM »
Hello,
How to I set a chunk to be the active chunk (ie. bolded) so that when I save the document that chunk is the active chunk when the .psx file is opened manually later on?
I have a script that iterates through a folder opening each .psx document and then aligns and merges chunks and saves the document.  It then does some processing to the merged chunk. But even though the merged chunk is the last chunk I reference  using chunk=chunks[2] (for example) that is not the active chunk when I reopen the file to see the results.
Thank you for help
D

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15160
    • View Profile
Re: Designate Chunk as active chunk
« Reply #1 on: February 03, 2023, 12:00:33 PM »
Hello danderson4,

To set chunk as active you need to perform the following assignment:

Code: [Select]
doc.chunk = doc.chunks[N]
Best regards,
Alexey Pasumansky,
Agisoft LLC