I’m trying to use a list to create a group of buttons, but I’m not very knowledgeable about how they work. The intent is to use one list to define the button name, and run the same list through a python script to create a rhino command. The buttons appear correctly, but both of them insert 2.3dm for some reason. Any ideas?
So I made a change to how the list is being generated and I think it may have brought up a related bug. Or there’s something wrong with my cobbled together python. I’m sure it could be done as a single py node but I don’t know how, or if it would make any real difference for HumanUI or otherwise.
The intent is to generate the list by watching a folder for .3dm files and use their filenames for the button names.
import os
for root, dirs, files in os.walk(y):
for file in files:
if file.endswith(".3dm"):
print(os.path.splitext(file)[0])
–
z= ' {}\{}.3dm ' .format(y, x)
a= "!-Insert {} group enter pause enter enter" .format(z)
print a
can you elaborate on what the bug is? I can’t reproduce this since I don’t have the same set of files + folders you do. One thing to note is you should wrap any paths in the command macro with quotes - otherwise it will likely not interpret the command correctly.