Max and min limits are string expressions to allow dependencies to properties such as other joint values. And the properties in python API are MinLimit and MaxLimit and not MinValue and MaxValue. If the expression is simple numeric literal such as “360” you can cast it to float. With complex expression there is a way to solve those by creating a temporary expression property and solving the expression with it.
Below there is an example which solves and prints link max limits for ABB IRB1200_5-90 robot, which has both simple and complex limit expressions:
from vcScript import *
app = getApplication()
comp = app.findComponent('IRB1200_5-90')
links =[comp]
prop = None
while links:
link = links.pop(0)
print link.Name
if link.Dof:
max_limit = 0
try:
max_limit = float(link.Dof.MaxLimit)
print ' MaxLimit:%.3f' % max_limit
except:
if not prop:
prop = comp.createProperty(VC_EXPRESSION, 'TempExpression')
prop.Value = link.Dof.MaxLimit
max_limit = prop.CalculatedValue
print ' MaxLimit:%.3f' % max_limit
else:
print ' No Dof.'
links.extend(link.Children)
if prop:
comp.deleteProperty(prop)