Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: jpstoryHi All
I have the following code to grab the field name for all fields in the node input pin.
Understood that there are other nodes can perform such task easily, but would particularly like to know how to get it done in Python Node.
The reason being that there's other logic already coded in this Python node and I just need this piece to work to enhance it:
I tried
.Name thought it might just be that simple but apparently too simplistic. Any ideas?
Also, just curious, what exactly is InRec, is it a Dictionary Object or just an Array?
def pump(self, quant):
while quant.permitsRunning(self):
inRec = self.inputs[0].read()
outRec = self.outputs[0].newRecord()
if not inRec:
return False
Size = len(inRec)
for i in range(Size):
outRec["Field" + str(i+1)] = inRec[i]
.name
self.outputs[0].write(outRec)
success = self.ProcessWrite(Size)