Look at code below for some examples of setting and getting book, sheet, and graph properties.
It seems not possible to get the various trees at this time.
Is is important to note that the originpro package is still young and will be improved as we have development time and get feedback such as this from our users.
import originpro as op
book = op.new_book()
book.name = 'mybook'
bn = book.name
book.lname = 'My Book Long Name'
bln = book.lname
book.set_str('comments', 'These are some book comments')
bc = book.get_str('comments')
wks = book[0]
wks.name = 'mysheet'
wn = wks.name
wks.lname = 'My Sheet Long Name'
wln = wks.lname
# Whoops these won't work!
wks.set_str('comments', 'These are some sheet comments')
wc = wks.get_str('comments')
# But these will
wks.obj.Comments = 'These are some sheet comments'
wc = wks.obj.Comments
gr = op.new_graph()
gr.name = 'mygraph'
gn = gr.name
gr.lname = 'My Graph Long Name'
gln = gr.lname
gr.set_str('comments', 'These are some graph comments')
cc = gr.get_str('comments')
Thanks,
Chris Drozdowski
Originlab Technical Support