Help with global context and building messages with it in `change` node

I may need to use a different node. I get that.

Dating back to when I started to use context, I didn't think think of this new problem.

Ok, here is a screen shot of what I have - with comments.

As is, I set the path. It is hard coded which I now see as a problem.
So I added the new line but don't know if a change node can facilitate what I am wanting to do.

The 9020-9C27 is fixed and if it needs to be changed, I have to edit two lines.
(Yeah, not the end of the world)

So I define that part as usb_path and want to use that in the two lines below, that way I only have to change ONE line.
Sorry if it is being anal, but just now that is sort of stuck in my head as a better way to do things.

Or will have to use a template node then set the context after it?

Does this work ?
image

I'll give it a go.

I was hoping to not need to use/get another node, but if it needs one, it needs one.

it is not another node, it can be in the same change node, that you have shown.

To clarify @smanjunath211 - when you use a change node and set a new property, you can immediately use it from the lines that were defined above (really useful). (just like you can in a function node, as that is what happens "underwater")

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.