xmindltd / xmind-sdk-python

MIT License
428 stars 179 forks source link

How to modify topic's marker #10

Open anstarword opened 9 years ago

anstarword commented 9 years ago

I only find addMarker in topic.py, but how to modify a topic's marker? For example, i want to replace all the topices' flag to priority. i want to

  1. get all the topic tree
  2. find which topic has the marker of flag
  3. delete the marker of flag
  4. add a marker of priority to topic

But i don't find how to delete a marker from topic

In the other hand, when i use recursion to add topic.addMarker, i get the decode error. I don't know why?

File "C:/Users/ayan/IdeaProjects/XmindReader/XmindReader-GenerateReadme2.py", line 57, in findTestCase topic.addMarker(MarkerId(newMarkerID)) File "C:\Python34\lib\site-packages\xmind-0.1a0-py3.4.egg\xmind\core\topic.py", line 133, in addMarker File "C:\Python34\lib\site-packages\xmind-0.1a0-py3.4.egg\xmind\core\markerref.py", line 131, in init File "C:\Python34\lib\site-packages\xmind-0.1a0-py3.4.egg\xmind\core\mixin.py", line 25, in init File "C:\Python34\lib\site-packages\xmind-0.1a0-py3.4.egg\xmind\coreinit.py", line 204, in init AttributeError: 'str' object has no attribute 'decode'