Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 6020

GetDocumentUserText Help

$
0
0

@kleerkoat wrote:

trying to hack together some other scripts into a nice editable view of DocumentUserText to attach to attach to text in a layout drawing. the following returns the list but it doesn't use the edits when it's run again, like it get re-initialized.

help appreciated! thank you

import rhinoscriptsyntax as rs
import Rhino as rh
import scriptcontext

def DocumentDataInput():

    Keylist = rs.GetDocumentUserText()
    if not Keylist:
        rs.MessageBox('No Object Data')
    else:
        UserDataList = []
        for n in Keylist:
            b = rs.GetDocumentUserText()
            UserDataList.append(b)

            newlist = []
            newlist = rs.PropertyListBox(
            Keylist, UserDataList, "User Data", "User Data Key List")

            if newlist:
                for c in range(len(Keylist)):
                    rs.SetDocumentUserText(Keylist[c], newlist[c])
DocumentDataInput()

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6020

Trending Articles