Jump to content

How to access `@attribute` in a TOPs python processor?

Recommended Posts

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?


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.

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 by eldrich
Solved problem.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now