utils: handle exception in objName()
This commit is contained in:
parent
1b43f4f701
commit
a9dc71978b
9
utils.py
9
utils.py
|
@ -53,9 +53,12 @@ def addIconToFCAD(iconFile,path=None):
|
|||
return iconName
|
||||
|
||||
def objName(obj):
|
||||
if obj.Label == obj.Name:
|
||||
return '"'+obj.Name+'"'
|
||||
return '"{}({})"'.format(obj.Name,obj.Label)
|
||||
try:
|
||||
if obj.Label == obj.Name:
|
||||
return '"'+obj.Name+'"'
|
||||
return '"{}({})"'.format(obj.Name,obj.Label)
|
||||
except Exception:
|
||||
return '?'
|
||||
|
||||
def isLine(param):
|
||||
if hasattr(Part,"LineSegment"):
|
||||
|
|
Loading…
Reference in New Issue
Block a user