添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
有腹肌的李子  ·  Solved: Notebook to ...·  4 天前    · 
胡子拉碴的刺猬  ·  SQL Syntax in Query ...·  3 天前    · 
至今单身的橙子  ·  Select objects by ...·  2 天前    · 
逆袭的饭卡  ·  @ttk/vue-ui - npm·  昨天    · 
发财的楼房  ·  guava/guava-tests/test ...·  8 月前    · 
咆哮的黑框眼镜  ·  LR ...·  10 月前    · 
冷静的柑橘  ·  layer.open关闭父窗口 ...·  1 年前    · 

Select objects by key/value _
i’m writing a little script in python to manage user string.
-i want to create a selection list box of key/value:
example:
first listbox: all the keys of the active doc
----------listBox-------------
select on key:
“material”
“zone”
“type”
----------------ok-----------------

after clicking on the key: “material”, the items of the listbox will be all the values related to that key (eg. “material”)
--------listBox------------
select values of “material”:
-any-
“steel”
“glass”
“wood”
------------ok-------------

clicking by clicking the objects will be selected until i will click the buttom “ok” going back to keys in order to select others key/values or clicking again “ok” in order to get that selection.

i need some commands i cannot find:

getkeys list of the active document
getvalues list related to a key

some body knows those commands?

an other question: why i cannot iterate this: objsId = rh.RhinoDoc.ActiveDoc.Objects.GetObjectList(rh.DocObjects.ObjectType.AnyObject) this doesn’t give me a list but an 'EnumeratorWrapper’ do you have some suggestion? keys.append(k) values.append([value]) kList = rs.ListBox(keys, "Keys to select:", "Select Objs by Key/Value") if kList in keys: index_kList = keys.index(kList) vList = rs.ListBox(["all"] + values[index_kList], "Values of " + kList , "Select Objs by Key/Value") if vList == "all": vList = "*" if vList: objs = rh.RhinoDoc.ActiveDoc.Objects.FindByUserString(kList, vList, True, True, True, rh.DocObjects.ObjectType.AnyObject) rs.SelectObjects(objs)