Forum

Author Topic: How to call project name and active chunk name  (Read 1983 times)

Abe Whaanga

  • Newbie
  • *
  • Posts: 15
    • View Profile
How to call project name and active chunk name
« on: April 19, 2020, 12:33:12 PM »
Hello,  I'm trying to export my model with the name of the active chunk and the current project as a concatenated name.  Is there a way to turn the names into a string? 
Code: [Select]
def check_string ():

    ###code for checking the convert obj to str function

    import Metashape
   
    doc = Metashape.app.document
    chunk = doc.chunk
    str(doc)
    print (doc)
    str(chunk)
    print (chunk)

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14847
    • View Profile
Re: How to call project name and active chunk name
« Reply #1 on: April 19, 2020, 07:19:24 PM »
Hello Abe Whaanga,

You can access the name of the chunk using chunk.label method. It returns string value already.
Best regards,
Alexey Pasumansky,
Agisoft LLC