Forum

Author Topic: Can I use python to change default shape group of a chunk?  (Read 1462 times)

ashalota

  • Jr. Member
  • **
  • Posts: 93
  • Forest orthomosaics, long transects (300m agl)
    • View Profile
    • NASA: G-LiHT (Public orthomosaics)
Can I use python to change default shape group of a chunk?
« on: December 11, 2020, 07:27:06 PM »
I am writing a script to let me use keyboard shortcuts to quickly switch between shape groups in a chunk.

I can't see where the python access is to change what the default shape group for the current chunk is though. Is this possible?

benj_G

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Can I use python to change default shape group of a chunk?
« Reply #1 on: January 06, 2021, 12:29:23 PM »
hi everybody,
we have the same issue, we try to remove a group wich is default.
we can remove all shapes in this layer but can't remove the group.
the code is following:
Code: [Select]
for s in doc.chunk.shapes.shapes:
   if s.group.label == "Tiles":
      doc.chunk.shapes.remove(s)
for g in doc.chunk.shapes.groups:
   if g.label == "Tiles":
      doc.chunk.shapes.remove(g)