Skip to content

How to change namespace url of variable? #1355

Closed Answered by schroeder-
VasilyBroze asked this question in Q&A
Discussion options

You must be logged in to vote

You can pass a nodeid instead of the namespace index:
myobj.add_variable(ua.NodeId("Light1", idx), "Light1", 0.0, ua.VariantType.Float)
Or like this:
myobj.add_variable(f"ns={idx};s=Light1", "Light1", 0.0, ua.VariantType.Float)
or like this:
myobj.add_variable("ns=1;s=Light1", "Light1", 0.0, ua.VariantType.Float)

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@VasilyBroze
Comment options

@schroeder-
Comment options

Answer selected by VasilyBroze
@VasilyBroze
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants