-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetUID.py
More file actions
25 lines (18 loc) · 711 Bytes
/
Copy pathsetUID.py
File metadata and controls
25 lines (18 loc) · 711 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import rhinoscriptsyntax as rs
import trkRhinoPy as trp
objs = rs.GetObjects('select objects', preselect=True)
def setUID(objs):
for idx, obj in enumerate(objs, start=1):
rs.SetUserText(obj, 'uid', 'uid-{}'.format(idx))
setUID(objs)
# def setQuickTag(obj, tagVal):
# rs.SetUserText(obj, 'tag', tagVal)
# def getQuickTag(tagVal):
# rs.Command('_SelKeyValue tag {}'.format(tagVal))
# def objsSetQuickTag():
# objs = rs.GetObjects('select objects to tag', preselect=True)
# tagVal = rs.GetString('Tag Value')
# map(lambda x: setQuickTag(x, tagVal), objs)
# def objsGetQuickTag():
# tagVal = rs.GetString('Tag Value')
# rs.Command('_SelKeyValue tag {}'.format(tagVal))