Showing results for 
Search instead for 
Did you mean: 

Edit free labels by reference (block diagram)

Go to solution

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?





0 Kudos
Message 1 of 3
Accepted by topic author michael.lambert

Believe this is what you want to cast it to. Then there is a writable "Text" property to change it. 




Test Engineer at Moog Inc.

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.

0 Kudos
Message 2 of 3

Huh, I swear I did that one and it errored. But tried it again and it seemed to work. User error...

0 Kudos
Message 3 of 3