10-26-2020 12:03 PM
Hi everyone,
Looking for feasibility on this: I'm using the bookmark manager API to filter through bookmarks with certain text (i.e. "#change") so that I can automatically pull the text from those labels into change logs and commit notes. I'd then like to either remove the "#" or edit the bookmark to say "**changed" so that the next time I run the script it won't pull this bookmark again.
I've found the first part of this (filtering through bookmarks) very easy, but I can't figure out how to achieve the second part. I'm able to get the object reference of the bookmark by passing the "bookmark ID" to the "GetObjRefFromBkmrkID" method (see screenshot). But the reference comes out as a generic GObj and the only methods are "Bounds" and "Position". I thought maybe I could cast the reference, but it's not obvious what type to cast to.
Can anyone confirm whether it's possible to edit the bookmark text by reference?
Thanks!
Michael
Solved! Go to Solution.
10-26-2020 12:46 PM
Believe this is what you want to cast it to. Then there is a writable "Text" property to change it.
Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.
10-26-2020 02:36 PM
Huh, I swear I did that one and it errored. But tried it again and it seemed to work. User error...