|
def | __init__ (self, obj) |
|
def | __del__ (self) |
|
def | __str__ (self) |
|
def | __bool__ (self) |
|
def | index (self) |
|
def | get_str (self, prop) |
|
def | get_int (self, prop) |
|
def | get_float (self, prop) |
|
def | set_str (self, prop, value) |
|
def | set_int (self, prop, value) |
|
def | set_float (self, prop, value) |
|
def | method_int (self, name, arg='') |
|
def | method_float (self, name, arg='') |
|
def | method_str (self, name, arg='') |
|
def | lt_exec (self, labtalk) |
|
def | name (self) |
|
def | name (self, value) |
|
def | lname (self) |
|
def | lname (self, value) |
|
def | comments (self) |
|
def | comments (self, value) |
|
def | show (self) |
|
def | show (self, value) |
|
def | usertree (self) |
|
def | usertree (self, tr) |
|
def | userprops (self) |
|
base class for all Origin objects
◆ comments() [1/2]
def originpro.base.BaseObject.comments |
( |
|
self | ) |
|
Property getter returns long name of object.
Parameters:
none
Returns:
long name of object.
Examples:
wb.comments='My labs data'
print(wb.comments)
◆ comments() [2/2]
def originpro.base.BaseObject.comments |
( |
|
self, |
|
|
|
value |
|
) |
| |
Property setter sets the comments of an object.
Parameters:
value(string):content of comments
Returns:
none
Examples:
wb.comments='My labs data'
print(wb.comments)
◆ get_float()
def originpro.base.BaseObject.get_float |
( |
|
self, |
|
|
|
prop |
|
) |
| |
Get object's LabTalk float property
Parameters:
prop(string): float prop like symbol.size, details on Origin objects' reference pages
Returns:
object's float property
Examples:
p=op.find_graph()[0].plot_list()[0]
print(p.get_float('symbol.size'))
◆ get_int()
def originpro.base.BaseObject.get_int |
( |
|
self, |
|
|
|
prop |
|
) |
| |
Get object's LabTalk int property
Parameters:
prop(string):int prop line
[cmap.stretchpal, cmap.linkpal symbol.kind], details on Origin objects' reference pages
Returns:
object's int property
Examples:
wks1 = op.new_sheet()
print(wks1.get_int('nrows'))
◆ get_str()
def originpro.base.BaseObject.get_str |
( |
|
self, |
|
|
|
prop |
|
) |
| |
Get object's LabTalk string property
Parameters:
prop(string): string prop like
[cmap.palette, colorlist, name], details on Origin objects' reference pages
Returns:
object's string property
Examples:
wks1 = op.new_sheet()
print(wks1.get_str('name'))
◆ index()
def originpro.base.BaseObject.index |
( |
|
self | ) |
|
interal index in corresponding collection of the object
Parameters:
none
Returns:
interal index
Examples:
wks1 = op.new_sheet()
print(wks1.index())
◆ lname() [1/2]
def originpro.base.BaseObject.lname |
( |
|
self | ) |
|
Property getter returns long name of object.
Parameters:
Returns:
(str)
Examples:
print(wb.lname)
◆ lname() [2/2]
def originpro.base.BaseObject.lname |
( |
|
self, |
|
|
|
value |
|
) |
| |
Property setter sets long name of object.
Parameters:
value (str): long name
Returns:
None
Examples:
wb.lname = 'My Data'
◆ lt_exec()
def originpro.base.BaseObject.lt_exec |
( |
|
self, |
|
|
|
labtalk |
|
) |
| |
executes a LabTalk statement.
Parameters:
labtalk (str): LabTalk statement
Returns:
None
Examples:
wb.lt_exec('page.longname$="lt_exec example"')
wks.lt_exec(r'expASC path:="c:\test\signal.csv";') #you can execute X-Function here
◆ method_float()
def originpro.base.BaseObject.method_float |
( |
|
self, |
|
|
|
name, |
|
|
|
arg = '' |
|
) |
| |
execute object's LabTalk method that has a float return
Parameters:
name(string):prop string, details on Origin objects' reference pages
arg:property value
Returns:
(float)LabTalk method's return value
Examples:
wks1 = op.new_sheet()
rowid=wks1.method_float('UserParam', '++test') #add user parameter row "test", and return its index on worksheet
◆ method_int()
def originpro.base.BaseObject.method_int |
( |
|
self, |
|
|
|
name, |
|
|
|
arg = '' |
|
) |
| |
execute object's LabTalk method that has an int return
Parameters:
name(string):prop string, details on Origin objects' reference pages
arg:property value
Returns:
(int)LabTalk method's return value
Examples:
wks1 = op.find_sheet()
issel = wks1.method_int('isColSel', '3') #return if 3rd col is selected
◆ method_str()
def originpro.base.BaseObject.method_str |
( |
|
self, |
|
|
|
name, |
|
|
|
arg = '' |
|
) |
| |
execute object's LabTalk method that has a string return
Parameters:
name(string):prop string, details on Origin objects' reference pages
arg:property value
Returns:
(string)LabTalk method's return value
Examples:
wks = op.new_sheet()
row, col = 1,1
wks.set_cell_note(row,col,'test Note')
cnote = wks.method_str('GetNote',f'{row+1},{col+1}')
◆ name() [1/2]
def originpro.base.BaseObject.name |
( |
|
self | ) |
|
short name of the object
Parameters:
none
Returns:
Origin object name
Examples:
gl=op.find_graph()[0]
print(gl.name)
◆ name() [2/2]
def originpro.base.BaseObject.name |
( |
|
self, |
|
|
|
value |
|
) |
| |
change the short name of an object, if there is a conflict,
Origin will change to next available name automatically
Examples:
gp=op.new_graph()
gp.name='Test'
gp=op.new_graph()
gp.name='Test'
print(gp)#Test1
◆ set_float()
def originpro.base.BaseObject.set_float |
( |
|
self, |
|
|
|
prop, |
|
|
|
value |
|
) |
| |
Set object's LabTalk float property
Parameters:
prop(string):prop string, details on Origin objects' reference pages
value:property value
Returns:
none
Examples:
p=op.find_graph()[0].plot_list()[0]
p.set_float('symbol.size', 4.5)
◆ set_int()
def originpro.base.BaseObject.set_int |
( |
|
self, |
|
|
|
prop, |
|
|
|
value |
|
) |
| |
Set object's LabTalk int property
Parameters:
prop(string):prop string, details on Origin objects' reference pages
value:property value
Returns:
none
Examples:
wks1 = op.new_sheet()
wks1.set_int('nrows', 10)
◆ set_str()
def originpro.base.BaseObject.set_str |
( |
|
self, |
|
|
|
prop, |
|
|
|
value |
|
) |
| |
Set object's LabTalk string property
Parameters:
prop(string):can be int/float/string property, details on Origin objects' reference pages
value:property value
Returns:
none
Examples:
wks1 = op.new_sheet()
wks1.set_str('name','test_set_str')
◆ show() [1/2]
def originpro.base.BaseObject.show |
( |
|
self | ) |
|
Property getter returns show state of object.
Parameters:
Returns:
(bool)
Examples:
print(wb.show)
◆ show() [2/2]
def originpro.base.BaseObject.show |
( |
|
self, |
|
|
|
value |
|
) |
| |
Property setter sets show state of object.
Parameters:
value (bool): True to show object
Returns:
None
Examples:
wb.show = True
◆ userprops()
def originpro.base.BaseObject.userprops |
( |
|
self | ) |
|
Parameters:
none
Returns:
Return User Tree as dict
Examples:
wks = op.new_sheet()
wks.set_str('tree.data.name', 'Larry')
wks.set_int('tree.data.age', 37)
wks.set_float('tree.data.mean', 23.56)
dd = wks.userprops['data']
print(dd)
◆ usertree() [1/2]
def originpro.base.BaseObject.usertree |
( |
|
self | ) |
|
Return User Tree as ElementTree
Parameters:
none
Returns:
ElementTree
Examples:
wks = op.new_sheet()
wks.set_str('tree.data.name', 'Larry')
wks.set_int('tree.data.age', 37)
wks.set_float('tree.data.mean', 23.56)
trWks = wks.usertree
trData = trWks.find('data')
for child in trData:
print(f'{child.tag} = {child.text}')
◆ usertree() [2/2]
def originpro.base.BaseObject.usertree |
( |
|
self, |
|
|
|
tr |
|
) |
| |
Set User Tree
Parameters:
tr (ElementTree): tree to set
Returns:
none
Examples:
import xml.etree.ElementTree as ET
wks = op.new_sheet()
tr = wks.usertree
data = ET.SubElement(tr, 'data')
version = ET.SubElement(data, 'Version')
version.set('Label', 'Origin Version')
version.text = '9.8b'
wks.usertree = tr
The documentation for this class was generated from the following file: