eldrich Posted January 21, 2020 Share Posted January 21, 2020 (edited) Hey folks, I'm executing a Windows .bat file which is written out by a pythonprocessor TOPs node to run some things on another sever. Everything works if I hardcode the filename to the batch file, but I want it to generate and execute .bat files for each work item I'm trying to access `@filename`in the pythonprocessor, but not getting anywhere. How can I access the attribute so .format fills in the path correctly? PidginCode: outFile = `@filename` filePath = "path to directory/{}".format(outFile) The sample file docs are bereft of examples so I'm wondering if I'm going about it the wrong way. Thoughts? EDIT: I made a string parameter on the node I'm querying and pointed evalParm at it. Is that the most sensible way? node = hou.node('/obj/topnet1/nodeName') parmName = str(node.evalParm('parm')) Edited January 22, 2020 by eldrich Solved problem. Quote Link to comment Share on other sites More sharing options...
benchan Posted August 3, 2021 Share Posted August 3, 2021 If you are doing per work item, I think it's better to use python script node instead of python processor. It will go through all work items one by one outFile = work_item.attribValue('filename') If you are using python processor, It only run once, so you have to use a loop to go through all the items and get the values one by one outFile1 = upstream_items[0].attribValue("filename") Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.